Forum Moderators: open

Message Too Old, No Replies

Bots ignoring Session IDs

How to set Session IDs to ignore bots

         

chavezr

4:14 pm on Oct 27, 2003 (gmt 0)

10+ Year Member



Can anyone give me any tips to set session IDs to ignore bots?

I need to continue using them, but want to set them to ignore bots crawling the site.

Any tips, suggestions or resources would be greatly appreciated.

Thanks,
<snip>

[edited by: engine at 5:08 pm (utc) on Oct. 27, 2003]
[edit reason] No sigs, thanks. See TOS [webmasterworld.com] [/edit]

BlueSky

6:23 pm on Oct 27, 2003 (gmt 0)

10+ Year Member



You need to mod the script to test for the user agent and not serve a session id for bots. There are literally hundreds maybe even thousands of these things crawling around. So, I recommend you limit testing to say the large search engines and/or those which frequent your site.

Not sure what language your script is in. If it's written in PHP, you can grab the UA string by using: $_SERVER['HTTP_USER_AGENT']. Then just use a string function to check whether that UA contains one of the bots in your list. If it does, don't serve it a session id. Some scripts are written so they won't work without a session. Hopefully, yours isn't like that.

mipapage

6:45 pm on Oct 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If yer using PHP, Nick_w Wrote something nice here [webmasterworld.com].