SHARE
TWEET

Shameless SEO

a guest Mar 13th, 2008 531 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/php
  2. <?php
  3.         //by http://shamelessseo.blogspot.com/
  4.         //////////////////////////////////////
  5.        
  6.         function getMeVisits($url, $checkPhrase, $visitMax = 0) { //default 0 = all proxys
  7.                 $proxyParam = "/index.php?q=".urlencode($url)."&hl=281"; // build up parameters for phproxy, hl=281 == only accept coockies & session cookies
  8.                
  9.                 $curl = curl_init(); //init curl to "visit" the webproxys
  10.                 curl_setopt($curl, CURLOPT_HEADER, 0); //no header, thanks
  11.                 curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); //content please
  12.                 curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 60); //connection timeout 1 min
  13.                 curl_setopt($curl, CURLOPT_TIMEOUT, 60); //site timeout 1 min
  14.                 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
  15.                
  16.                 $proxyContent = @file_get_contents("http://www.tech-faq.com/proxylist.js") or die("No List"); //parse from this neat web proxy list
  17.                
  18.                 preg_match_all("/value=\"(.*?)\"/", $proxyContent, $proxyList); //find all between value=" and ", save in array proxyList
  19.  
  20.                 for($i = 0; $i < count($proxyList[1]); $i++) { //process every link
  21.                         $proxySite = $proxyList[1][$i]; //store it
  22.                        
  23.                         curl_setopt($curl, CURLOPT_URL, $proxySite.$proxyParam); //let go curl there
  24.                         $content = curl_exec($curl); //exec and get content (proxy + site content)
  25.                        
  26.                         if(strpos($content, $checkPhrase) != 0) { //success, site loaded through proxy +1 visitor
  27.                                 $success++; //count the visits
  28.                                 echo ($i + 1).": [+]";
  29.                         } else {
  30.                                 echo ($i + 1).": [-]";
  31.                         }
  32.                        
  33.                         echo " $proxySite\n";
  34.                        
  35.                         if(($i + 1) == $visitMax) {
  36.                                 break; //exit loop if max is reached
  37.                         }
  38.                 }
  39.  
  40.                 curl_close($curl); //free curl
  41.                
  42.                 echo "[#] Done! Successful with $success Proxies\n";
  43.         }
  44.        
  45.         getMeVisits("http://yourwebsite.com", "some words just on your website");
  46. ?>
RAW Paste Data
Want to get better at PHP?
Learn to code PHP in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top