1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

tool for checking how many pages of a certain site are indexed

Discussion in 'Link Building' started by streetmedic, Oct 29, 2009.

  1. streetmedic

    streetmedic Newbie

    Joined:
    Oct 29, 2009
    Messages:
    5
    Likes Received:
    3
    This tool for checking how many pages of a certain site are indexed might be handy to you. Its not demo?d here because it?d get hammered! Use sparingly. NB that using a script such as this is against G?s t?s & c?s so you use this at your own risk

    ini_set(?user_agent?,'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.12);?);

    PHP:
    <?php
    $site 
    $_GET['site'];
    if (
    $site){
     
    $doc file_get_contents(?http://www.g**gle.com/search?q=site%3a?.$_GET['site']);
     
    if (strpos($doc, ?did not match any documents?)!==false){
      echo ?
    $site no pages indexed?;
     }
     else {
      
    $match preg_match(?#of about <b>([0-9,]*)</b>#?, $doc, $matches);
      
    echo ?$site: ?.$matches[1].? pages indexed?;
     }
    }
    ?>
    <form>
    site : http://<input name=?site?><input type=?submit? value=?go >?>
     
  2. Berto

    Berto Junior Member

    Joined:
    Jun 20, 2009
    Messages:
    110
    Likes Received:
    12
    FYI - If you want to have this work with proxies, you can use the following code. I can also show you how to make it open a random proxy out of proxies.txt

    PHP:
      $myContext = array(
        
    'http' => array(
          
    'proxy' => 'tcp://127.0.0.1:8118'// I'm running TOR / Privoxy
          
    'request_fulluri' => TRUE
        
    )
      );
      
    $returnedContext stream_context_create($myContext);

     
    $doc file_get_contents(?http://www.g**gle.com/search?q=site%3a?.$_GET['site'], FALSE, $returnedContext);
    // ...and on to the rest of the code....
    Enjoy