I downloaded a free script from: http://www.obleam.com/yahoo/
this is suppose to check for expired domains still located in the
directory of Yahoo. I have tried several chmod permissions (755, 644,
777) with only errors.
The script is setup at the following page:
http://www.sun-cell.com/yahoo/yahoo.php
yahoo.php:
<?
//////////////////////////////////////////////
// YAHOO! Expired Domain Finder v1.0 //
// http://www.obleam.com/yahoo/ //
//////////////////////////////////////////////
?>
<html>
<head>
<title>Yahoo Expired Domain Finder</title>
</head>
<body bgcolor="#ffffff">
<font face="courier new, arial" size="2">
<?
if (!$action) {
?>
<center>
<table border="0" cellspacing="4" cellpadding="5">
<form action="yahoo.php" method="get">
<input type="hidden" name="action" value="gather">
<tr>
<td bgcolor="#777777" align="center" colspan="2"><font
face="verdana, arial" size="2" color="#ffffff"><b>Yahoo! Expired
Domain Finder</b></font></td>
</tr>
<tr>
<td><font face="verdana, arial" size="2">Yahoo! Category
URL:</font><br>
<input type="text" name="url" size="70"
value="http://dir.yahoo.com/Entertainment/Music/Lyrics/"></td>
</tr>
<tr>
<td colspan="2"><font face="verdana, arial" size="2">Check</font>
<input type="text" name="pp" value="10" size="2"> <font face="verdana,
arial" size="2">domains at once.<br>
<font size="1">(Setting this too high might cause timeouts and/or
excessive resource usage.)</font> </font></td>
</tr>
<tr>
<td align="center"><br><input type="submit" value="check now!"></td>
</tr>
</form>
</table>
</center>
<?
}
elseif ($action == "gather") {
$page = file($url);
$news = implode("", $page);
preg_match_all("/srd\.yahoo\.com\/drst\/(.+?)\/\*http\:\/\/(.+?)\.(com|net|org)(\"|\/)/i",
$news, $string, PREG_PATTERN_ORDER);
$db = fopen("db.txt", "w");
$n = 0;
while (list(,$match) = each($string[2])) {
$parts = preg_split("/\./", $string[2][$n]);
$num = count($parts) - 1;
$tocheck = $parts[$num].".".$string[3][$n];
if ($domains[$tocheck] != "yes") {
fputs ($db, "$tocheck\n");
$domains[$tocheck] = "yes";
}
$n++;
}
fclose($db);
?>
<html>
<head>
<meta http-equiv="refresh"
content="0;url=yahoo.php?action=check&pp=<?echo $pp?>&new=1">
</head>
<body>
Gathering domains.<p>Please wait...
</body>
</html>
<?
}
elseif ($action == "showresults") {
?>
<center>
<table border="0" cellspacing="1" cellpadding="7">
<tr>
<td><font face="verdana, arial" size="1"><b>Domain</b></font></td>
<td align="center"><font face="verdana, arial"
size="1"><b>Status</b></font></td>
</tr>
<?
$db = file("ndb.txt");
$n = 0;
while (list(,$d) = each($db)) {
$n++;
if (is_int($n / 2)) { $bg = "#dddddd"; }
else { $bg = "#eeeeee"; }
list($domain,$status,$u) = preg_split("/\|/", $d);
?>
<tr bgcolor="<?echo $bg?>">
<td><font face="verdana, arial" size="1"><?echo
$domain?></font></td>
<td align="center"><font face="verdana, arial" size="1"><?echo
$status?></font></td>
</tr>
<?
}
?>
</table>
</center>
<?
}
elseif ($action == "check") {
$db = file("db.txt");
$total = count($db);
if ($new == 1) {
$start = 0;
$ndb = fopen("ndb.txt", "w");
?>
<p><?echo $total?> domains gathered.</p>
<?
}
else { $ndb = fopen("ndb.txt", "a"); }
$end = $start + $pp - 1;
if ($end >= ($total-1)) {
$end = $total - 1;
$finished = "yes";
}
$newstart = $end + 1;
?>
<p>Checking domains <?echo $start+1?> through <?echo $newstart?></p>
<?
for ($i = $start; $i <= $end; $i++) {
$tocheck = chop($db[$i]);
$ptr = fsockopen("whois.nsiregistry.net", 43);
if ($ptr>0) {
fputs($ptr, "whois $tocheck\n");
while(!feof($ptr)) {
$output=fgets($ptr, 1024);
}
if (preg_match("/No match/i", $output)) { $status =
"<b><red>Available</red></b>"; }
else { $status = "Registered"; }
}
else {
echo "Could not connect to whois server";
exit;
}
fclose($ptr);
fputs($ndb, "$tocheck|$status|\n");
}
if ($finished) {
?>
<meta http-equiv="refresh"
content="0;url=yahoo.php?action=showresults">
<p>Checking process done.<p>Building results page...</p>
<?
}
else {
?>
<meta http-equiv="refresh"
content="0;url=yahoo.php?action=check&start=<?echo
$newstart?>&pp=<?echo $pp?>">
<p>Please wait...</p>
<?
}
fclose($ndb);
?>
<?
}
?>
</font>
<br><br><br><p align="center"><font face="verdana, arial"
size="1">Powered by <a href="http://www.obleam.com/yahoo/">Yahoo
Expired Domain Finder v1.0</a></font></p>
</body>
</html> |