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

[$_GET] 500+ Google Datacenter IP's CSV

Discussion in 'Black Hat SEO' started by niggles, Jul 4, 2009.

  1. niggles

    niggles Newbie

    Joined:
    May 23, 2009
    Messages:
    38
    Likes Received:
    14
    Occupation:
    Web developer
    Location:
    Melbourne Australia
    Home Page:
    I saw a list of 500+ Google data center IP's here -> http://www.seo-scoop.com/2006/06/23/current-known-google-datacenter-ip-list/

    So I've turned it into a CSV file and attached it.

    For those of you interested, it was pretty easy to extract the list from the HTML. I just saved the HTML which had the list and then ran this code over it instead of spending ages doing it by hand.


    PHP:
    $myString ='1. 64.233.161.18<br />
    2. 64.233.161.19<br />etc....'
    ;

    $myStringArray = array();
    // add a pipe to keep end of record
    $myString str_replace('<br />''|'$myString);
    // get rid of new lines
    $myString str_replace("\r"''$myString);
    // explode to array so we can work with each record
    $myStringArrayTemp explode(" " $myString);
    // strip out the 1., 2. sequential numbering
    for($i=1;$i<520;$i++){
        
        if(
    $i<9){
        
            
    $myStringArray[] = substr($myStringArrayTemp[$i], 0, -3);
        } 
        
        if(
    $i>=and $i99){
        
            
    $myStringArray[] = substr($myStringArrayTemp[$i], 0, -4);
        }
        
        if(
    $i>=99){
        
            
    $myStringArray[] = substr($myStringArrayTemp[$i], 0, -5);
        
        }
    }
    // implode to comma delimited
    $final implode(","$myStringArray);
    echo 
    $final;
     

    Attached Files:

    • Thanks Thanks x 1
  2. ProfitNow

    ProfitNow Regular Member

    Joined:
    Jun 30, 2009
    Messages:
    411
    Likes Received:
    659
    Hey, Can you explain what you can do with these?
     
  3. niggles

    niggles Newbie

    Joined:
    May 23, 2009
    Messages:
    38
    Likes Received:
    14
    Occupation:
    Web developer
    Location:
    Melbourne Australia
    Home Page:
    If you want to do lots of automated queries to Google, you can't send more than a couple of queries in a short time before it gives an error message stating you might be using a bot.

    By choosing a random datacenter each time from the list you could make a bunch of queries without throwing up the error.

    Cheers,
    Niggles
     
  4. demoniox

    demoniox Registered Member

    Joined:
    Mar 5, 2007
    Messages:
    98
    Likes Received:
    83
    Thanks for sharing :), here is another code useful for scrapping ips
    PHP:
    <?php
    set_time_limit
    (0);
    $url "http://www.seo-scoop.com/2006/06/23/current-known-google-datacenter-ip-list/";
    $data file_get_contents($url) or die("ERROR");
    preg_match_all('/(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:[.](?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}/si',$data,$matchs);
    foreach(
    $matchs[0] as $ip) {
        echo 
    '"'.ip2long($ip).'","'.$ip.'","'.gethostbyaddr($ip)."\"\n";
    }
    ?>
     
  5. niggles

    niggles Newbie

    Joined:
    May 23, 2009
    Messages:
    38
    Likes Received:
    14
    Occupation:
    Web developer
    Location:
    Melbourne Australia
    Home Page:
    That's much cleaner than mine! I hate preg_match (mainly because I don't understand it), but I know I could have stripped all those URL's in 1 line of code instead of lots!!!

    Cheers,
    Niggles