rendered paste body<?PHP
#$input = DNS_Lookup("bloodsport.com");
#$num = Get_Num($input);
#echo DNS_Split(DNS_Match($input), $num);
#echo Sort_List("site.txt");
function test_site($dir, $path, $preg, $preg1, $num)
{
}
function load_plugin()
{}
function Sort_List($list)
{
foreach(file($list) as $line)
{
$site = str_replace(array("\r", "\n", ' '), '', $line);
is_valid($site);
}
}
function is_valid($site)
{
if(!browse($site))
{
echo "Couldn't connect to $site <br>";
}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, '<font face="arial" size="-1">', "</font>");
return $input;
}
function DNS_Split($input, $num)
{
$num = $num + 1;
for ($i =0;$i<$num;$i++){
$new = input_match($input, $i, ")", "<br>");
$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;
}
?>