Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Senior Member Arunan's Avatar
    Join Date
    Jan 2003
    Location
    Toronto, Ontario
    Posts
    139
    Member #
    478
    How do I recognize googlebot?
    HTTP_USER_AGENT['googlebot']
    ?
    Arunan S.
    CEO/President
    ServerLines, LLC.

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Senior Member Arunan's Avatar
    Join Date
    Jan 2003
    Location
    Toronto, Ontario
    Posts
    139
    Member #
    478
    I am going to do a hack so when the agent is googlebot, that there are no sessions, how would I do this?
    Arunan S.
    CEO/President
    ServerLines, LLC.

  5. #4
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    No idea when it comes to that in vB context, you'll have to ask at vB.org, although this function should work:
    PHP Code:
    function isgooglebot()
    {
        return (
    strpos($_SERVER['HTTP_USER_AGENT'], "Googlebot") != false);

    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  6. #5
    Senior Member Arunan's Avatar
    Join Date
    Jan 2003
    Location
    Toronto, Ontario
    Posts
    139
    Member #
    478
    How about if I make $session[sessionhash]
    into a variable so then
    if ($_SERVER['HTTP_USER_AGENT'] == "Googlebot") {
    $forumsession = "";
    }else{
    $forumsession = $session[sessionhash];
    }
    Arunan S.
    CEO/President
    ServerLines, LLC.

  7. #6
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    PHP Code:
    function setshash()
    {
        global 
    $session;
        if (
    strpos($_SERVER['HTTP_USER_AGENT'], "Googlebot") != false)
        {
            
    $session['sessionhash'] = "";
        }

    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  8. #7
    Senior Member Arunan's Avatar
    Join Date
    Jan 2003
    Location
    Toronto, Ontario
    Posts
    139
    Member #
    478
    umm I do not understand how to go about implementing this.
    Arunan S.
    CEO/President
    ServerLines, LLC.

  9. #8
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Call setshash when a page is loading to remove the sessionhash for Google.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  10. #9
    Senior Member Arunan's Avatar
    Join Date
    Jan 2003
    Location
    Toronto, Ontario
    Posts
    139
    Member #
    478
    I see...*looks around*
    Not being at vB.org and not using php all day has had a major impact on the way I code lol...*goes off to prance around*
    Arunan S.
    CEO/President
    ServerLines, LLC.

  11. #10
    Senior Member Arunan's Avatar
    Join Date
    Jan 2003
    Location
    Toronto, Ontario
    Posts
    139
    Member #
    478
    How would I test if this is actually working?

    Thanks again Filb!
    Arunan S.
    CEO/President
    ServerLines, LLC.


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:43 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com