Library code snippets
Domain scanner
By Akas Triono Hadi, published on 20 Feb 2002
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>
Related articles
Related discussion
-
Ventrilo Server Status Php. Snmp Server Enable Traps
by MarkHewitt (0 replies)
-
Aion Server Status Php, Server Racks Cabinets
by MarkHewitt (0 replies)
-
Moparscape Server Status Php - Global Catalog Server Could Not Be Located
by MarkHewitt (0 replies)
-
accutane online without prescription, isotretinoin online, accutane cost, accutane acne treatment
by torgo (0 replies)
-
We are seeking a highly skilled iPhone Develope
by Kim abunado (0 replies)
Related podcasts
-
EarthClassMail.com - Moving from LAMP to .NET 3.5
Scott chats with Matt Davis, architect at EarthClassMail.com, about their move from a LAMP stack (Linux/Apache/mysql/PHP) to .NET 3.5. What's working, what's not, and what kinds of issues are they running into as their architect their solution.
Events coming up
-
Apr
17
WebTech Conference 2010 - Bulgaria
Veliko Turnovo, Bulgaria
6th edition of WebTech conference will be held. A 2 day conference about : - Web Technologies - Blogs and blogging - Web 3.0 - Open Web - Mobile technologies - Internet Business
<?
// 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=abc","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>
I tried exectuting the above code posted by Akas Triono Hadi ( castamaster )
it gives me an error "error when connect " -- when fopen command is executed pliz help me rectify it
thanx in advance
I tried the code
"error when connect " while trying to open the file pliz help
thanks in advance
This thread is for discussions of Domain scanner.