";
}else{
$fh = fopen("valid.txt", 'a');
$fh = fwrite($fh, "$site \r\n");
fclose($fh);
}
}
function DNS_Lookup($site)
{
$input = post("http://www.seologs.com/ip-domains.html", "domainname=$site&submit=submit");
return $input;
}
function DNS_Match($input)
{
$input = input_match($input, 2, '', "");
return $input;
}
function DNS_Split($input, $num)
{
$num = $num + 1;
for ($i =0;$i<$num;$i++){
$new = input_match($input, $i, ")", "
");
$fh = fopen("site.txt", 'a');
$fh = fwrite($fh, "$new \r\n");
fclose($fh);
}
return $new;
}
function Get_Num($input)
{
$input = input_match($input, 1, "Found", "websites");
return $input;
}
function input_match($source, $num, $preg, $preg1)
{
$parts = explode($preg, $source);
$parts = explode($preg1, $parts[$num]);
$var = $parts[0];
return $parts[0];
}
function post($site, $data)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$site);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER, $site);
$result = curl_exec ($ch);
return $result;
}
function browse($url)
{
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt ($ch, CURLOPT_TIMEOUT, '10');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$store = curl_exec ($ch);
return $store;
}
?>