Anyone knows IP of bots?

Discussion in 'Search Engine Optimization' started by JEET, Sep 18, 2006.

  1. #1
    Hi,
    Anyone here knows the IP of yahoo, msn, google bots?
    I checked my access logs and got the following.
    65.54.188.103 // msn
    72.30.107.152 // yahoo
    74.6.74.176 // yahoo
    72.30.111.72 //yahoo
    72.30.103.225 //yahoo
    66.249.65.37 //google

    Yahoo's IP seem to change every visit. What's that about?
    Secondly, are there any more "good SE bots" which hit your sites and can you give an IP for them?
    Thank you :)
     
    JEET, Sep 18, 2006 IP
  2. vagrant

    vagrant Peon

    Messages:
    2,284
    Likes Received:
    181
    Best Answers:
    0
    Trophy Points:
    0
    #2
    vagrant, Sep 18, 2006 IP
    JEET likes this.
  3. JEET

    JEET Notable Member

    Messages:
    3,832
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #3
    WOW! That's exactly what I was looking for! :)
    Sending some green to you. Thank you :)
     
    JEET, Sep 18, 2006 IP
  4. GTech

    GTech Rob Jones for President!

    Messages:
    15,836
    Likes Received:
    571
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Here's a list of IP ranges for SE bots:

    As a bonus, here's some code to use that list with. Save the IP list above as "iplist.txt" and use the following function to determine if a visitor on your site is from the list above:

    
    function is_bot() {
      $ip = getenv(REMOTE_ADDR);
      $ip_ocets = explode('.', $ip);
      $temp = array_map('rtrim', file('iplist.txt'));
      $j = count($temp);
      for ($i = 0; $i < $j; $i ++) {
        if ((strstr($temp[$i], ';') === FALSE) && ($temp[$i] > '')) {
         $ip_list[] = $temp[$i];
       }
      }
     
      unset($temp);
     
      $is_bot = FALSE;
     
      $i = 0;
      while ($i <= count($ip_list)-1) {
        $ip_range = explode(' - ', $ip_list[$i]);
        $ip_range_min_ocets = explode('.', $ip_range[0]);
        $ip_range_max_ocets = explode('.', $ip_range[1]);
        $x = 0;
        while ($x <= count($ip_range_max_ocets)-1) {
          if (($ip_ocets[0] >= $ip_range_min_ocets[0])
              && ($ip_ocets[0] <= $ip_range_max_ocets[0])
             && ($ip_ocets[1] >= $ip_range_min_ocets[1])
             && ($ip_ocets[1] <= $ip_range_max_ocets[1])
             && ($ip_ocets[2] >= $ip_range_min_ocets[2])
             && ($ip_ocets[2] <= $ip_range_max_ocets[2])
             && ($ip_ocets[3] >= $ip_range_min_ocets[3])
             && ($ip_ocets[3] <= $ip_range_max_ocets[3]))
           {$is_bot = TRUE; break;}
           else {$x++;}
        }
       if ($is_bot) {break;} else {$i++;}
      }
      return $is_bot;
    }
    
    Code (markup):
    Implementation is simple. At the beginning of your php page:

    
    <?
    $isbot = is_bot();
    if ($isbot) {
      ...do something here ;
    } else {
      ...do something else here ;
    }
    ?>
    
    Code (markup):
     
    GTech, Sep 18, 2006 IP
    Arnie, Mia and Pat Gael like this.
  5. mike390

    mike390 Peon

    Messages:
    262
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    what would be the point of finding the search bot ips?
     
    mike390, Sep 18, 2006 IP