Domain scanner

This simple code collects a list of domains with a certain extension from google.com


<?
// Thx to idban 4 your grabbing tools, did you remember me? :)
//  My little hero : wulan
//
// Jakarta : September, 6 2001

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form method="post" action="<?$php_self?>">
 domain :
 <input type="text" name="domain" value="co.id">
 <br>
 <br>
 preview :
 <select name="prev" size="1">
   <option value="10" selected>10 result</option>
   <option value="20">20 result</option>
   <option value="30">30 result</option>
   <option value="50">50 result</option>
   <option value="100">100 result</option>
 </select>
 <input type="submit" name="Submit" value="Submit">
</form>
<br><br>
<?

$file=fopen("http://www.google.com/search?num=$prev&btnG=Google+Search&as_epq=$domain","r");  
if (!$file) {  
   echo "error when connect\n";  
   exit;
}
while (!feof($file)) {  
   $line = fgets($file,1024);  
   if (eregi("related:(.*)/>Similar pages", $line, $out)){  
   $i++;
   if (ereg($domain, $out[1])){
       echo $out[1]."<br>";
   }
}
fclose($file);  

?>
</body>
</html>

You might also like...

Comments

Akas Triono Hadi

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” - Tom Cargill