LanciaStratos
01-16-2003, 04:14 AM
Dontom posted (http://www.vbulletin.com/forum/showpost.php?postid=396411&postcount=42) the following code over at vB.com, and I want to use it on my forums to set the sessionid to null when the http-user-agent is the Googlebot, so Google won't have any trouble crawling my forum pages.
if (eregi("googlebot",getenv("HTTP_USER_AGENT" )) || eregi("internetseer",getenv("HTTP_USER_AGENT" )) || eregi("WebCrawler",getenv("HTTP_USER_AGENT" ))) {
$session = NULL;
}
Now, before I go off adding this to my forum, my question is, will this code actually do the job, and where should I insert this code to get the job done?
if (eregi("googlebot",getenv("HTTP_USER_AGENT" )) || eregi("internetseer",getenv("HTTP_USER_AGENT" )) || eregi("WebCrawler",getenv("HTTP_USER_AGENT" ))) {
$session = NULL;
}
Now, before I go off adding this to my forum, my question is, will this code actually do the job, and where should I insert this code to get the job done?