Forum Moderators: coopster

Message Too Old, No Replies

how to do a browser check with php

to test for SE spiders

         

HelenDev

1:15 pm on Jun 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can anyone help with this?

Just so I can avoid giving spiders cookies, 'cos I hear they don't like them...

...their mouths aren't big enough for a start

jatar_k

5:41 pm on Jun 18, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



get_browser [ca.php.net]
or setcookie then check it
or check $_SERVER['HTTP_USER_AGENT'] and compare to a list of spider user agents
or ips

though those last are a little over the top. Setting it and then seeing if it is there should be fine or get_browser may work for what you need.

HelenDev

8:53 am on Jun 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks jatar_k.

The reason I wanted to do this was that I have heard that setting a cookie or starting a session can upset the SE spiders (is this correct?), so I don't really want to set a cookie and then see if it's there.

With the get_browser or the check $_SERVER['HTTP_USER_AGENT'] way, what am I looking for that would tell me if it is a SE? You mentioned a list of spider user agents - where would be the best place to get such a list?

Thanks,
Helen.

jatar_k

5:30 pm on Jun 24, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you would look for the user agent that the spiders identify themselves with

you could use this site
[iplists.com...]

lists UAs and IPs

HelenDev

7:56 am on Jun 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the info jatar_k.

Helen.