
Shameless SEO
By: a guest on Mar 13th, 2008 | syntax:
PHP | size: 1.85 KB | hits: 527 | expires: Never
#!/usr/bin/php
<?php
//by http://shamelessseo.blogspot.com/
//////////////////////////////////////
function getMeVisits($url, $checkPhrase, $visitMax = 0) { //default 0 = all proxys
$proxyParam = "/index.php?q=".urlencode($url)."&hl=281"; // build up parameters for phproxy, hl=281 == only accept coockies & session cookies
$curl = curl_init(); //init curl to "visit" the webproxys
curl_setopt($curl, CURLOPT_HEADER
, 0
); //no header, thanks
curl_setopt($curl, CURLOPT_RETURNTRANSFER
, 1
); //content please
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT
, 60
); //connection timeout 1 min
curl_setopt($curl, CURLOPT_TIMEOUT
, 60
); //site timeout 1 min
curl_setopt($curl, CURLOPT_USERAGENT
, "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12"); //user agent FF 2.0
$proxyContent = @file_get_contents("http://www.tech-faq.com/proxylist.js") or
die("No List"); //parse from this neat web proxy list
preg_match_all("/value=\"(.*?)\"/", $proxyContent, $proxyList); //find all between value=" and ", save in array proxyList
for($i = 0; $i < count($proxyList[1
]); $i++) { //process every link
$proxySite = $proxyList[1][$i]; //store it
curl_setopt($curl, CURLOPT_URL
, $proxySite.$proxyParam); //let go curl there
$content = curl_exec($curl); //exec and get content (proxy + site content)
if(strpos($content, $checkPhrase) != 0) { //success, site loaded through proxy +1 visitor
$success++; //count the visits
echo ($i + 1).": [+]";
} else {
echo ($i + 1).": [-]";
}
echo " $proxySite\n";
if(($i + 1) == $visitMax) {
break; //exit loop if max is reached
}
}
echo "[#] Done! Successful with $success Proxies\n";
}
getMeVisits("http://yourwebsite.com", "some words just on your website");
?>