You are here: Re: Can you avoid that googlebot indexes PHPSESSID pages? « PHP Programming Language « IT news, forums, messages
Re: Can you avoid that googlebot indexes PHPSESSID pages?

Posted by Scott on 04/04/06 12:00

On Mon, 2006-04-03 at 23:57 -0700, CAH wrote:
> > There was some discussion of forcing cookies, but the author didn't want
> > to limit his users, so...
> >
> > How about doing something like this:
> >
> > // See if the user agent is Googlebot
> > $isGoogle = stripos($_SERVER['HTTP_USER_AGENT'], 'Googlebot');
> >
> > // If it is, use ini_set to only allow cookies for the session variable
> > if ($isGoogle !== false) {
> > ini_set('session.use_only_cookies', '1');
> > }
>
> That is a cool solution, but can one be sure that one can reconize
> googlebot? And how about all the other robots? Could one make a "is not
> robot test"?
>
> Thanks for the help
> Mads
>

I wouldn't expect all (or even most) robots to be easily identified by
the user-agent. Maybe you could make an array of the most common ones
(Googlebot, Inktomi, etc) and loop through it with the logic I
suggested. I also don't think you could check to see if it's a browser,
because firewalls & proxy servers may not send that information through.

Sorry! (It's not my internet. I just work here!)

Scott

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация