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

PHP snippet I wrote to detect google

Discussion in 'Cloaking and Content Generators' started by oneduality, Mar 10, 2011.

  1. oneduality

    oneduality Newbie

    Joined:
    Aug 16, 2010
    Messages:
    5
    Likes Received:
    0
    Use it for whatever you want .. white hat uses? maybe clean things up to help the spiders out, make it faster to index...

    black hat uses? ... oh I dunno, inject content, alter titles.. whatev.. but use at your own risk, I can say this much, it's been tested for some specific purposes to great success .. with this you can use the variable $is_google and do your thing if it's set to true.. this does not rely on user-agent because I'm told googlebot sometimes spoofs this to detect cloaking..

    Actually I removed the code from here, if you want it .. PM me :)
     
    Last edited: Mar 10, 2011
  2. mazgalici

    mazgalici Supreme Member

    Joined:
    Jan 2, 2009
    Messages:
    1,489
    Likes Received:
    881
    Home Page:
    Is based on the user agent?
     
  3. gimme4free

    gimme4free Executive VIP Jr. VIP Premium Member

    Joined:
    Oct 22, 2008
    Messages:
    1,879
    Likes Received:
    1,931
  4. R4z0r

    R4z0r BANNED BANNED

    Joined:
    Mar 21, 2010
    Messages:
    43
    Likes Received:
    20
    why not just simply use the .htaccess? it also takes less resources