PHP & Googlebot help

Discussion in 'PHP' started by turbohacker, Sep 20, 2010.

  1. #1
    I have a script which im using on part of my site, which I think is stopping googlebot and other search engines from indexing those pages I use it on.

    Is there anyway I can implement a small script that allows google and other spiders to browse if it is in fact google?

    example...


    If user = human

    exec php script

    else

    dont exec script.

    Or maybe the other may round, Im not sure.

    Please help

    Thanks
     
    turbohacker, Sep 20, 2010 IP
  2. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #2
    What makes you think google cant index the pages ?

    Have you ever tried to use Googles webmaster tools, you can enter your site urls in there and read responses etc..
     
    MyVodaFone, Sep 20, 2010 IP
  3. seoforall

    seoforall Peon

    Messages:
    40
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    showing different pages to users and bots is called cloacking and you will soon or late get caught and penalized for that by the search engines
     
    seoforall, Sep 20, 2010 IP
  4. turbohacker

    turbohacker Peon

    Messages:
    163
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    its a cpa survey.

    And I think it is stopping google from indexing the certain pages im using it on.

    Its not like im "cloaking" to hide malicious scripting or anything. Im doing it so google index's pages. My new pages get indexed pretty quickly without cpalead.
     
    turbohacker, Sep 20, 2010 IP
  5. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #5
    Last edited: Sep 20, 2010
    MyVodaFone, Sep 20, 2010 IP
  6. seoforall

    seoforall Peon

    Messages:
    40
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    if (preg_match("/google/i", $_SERVER['HTTP_USER_AGENT'])) {
    // show whatever you want to show to googlebot here
    } else {
    // show whatever you want to show to a normal visitor here
    }

    still, be carefull about the cloaking issue here ..

    also, know that google has some "radar" boats which don't identify themselves as googlebot in their useragent (or anywhere else) and also i do honestly believe they have human reviewers

    the point is that if there's a major difference in page viewed by normal googlebot and the rogue bot - you may get penalized
     
    seoforall, Sep 20, 2010 IP