Browser sniffer for bots

This is a discussion on Browser sniffer for bots within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi again! :) Does anyone know of a good browser sniffer (something like phpSniff) that would know about bots / crawlers / search ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-21-2005
Anze
 
Posts: n/a
Default Browser sniffer for bots

Hi again! :)

Does anyone know of a good browser sniffer (something like phpSniff) that
would know about bots / crawlers / search engine robots? PhpSniff is great,
but unfortunately it only returns empty string instead of browser family
when confronted with bots.

I am building my counter and would like to filter out search engine bots
from the results (and display them separately) - so I need to know which
bots are from Google, MSN, Yahoo,...

Thank you in advance!

Regards,

Anze
Reply With Quote
  #2 (permalink)  
Old 09-21-2005
Anze
 
Posts: n/a
Default Re: Browser sniffer for bots

OK, got it: get_browser() - I can complement it with phpSniff to get all the
data I need. :)

Regards,

Anze
Reply With Quote
  #3 (permalink)  
Old 09-21-2005
Anze
 
Posts: n/a
Default Re: Browser sniffer for bots


Hmmm... :(
Original question still stands.

It seems that get_browser() only works if the administrator has enabled the
browscap directive and pointed it to the right location of browscap.ini
file - not an option for me as I host the pages with different providers.

Any idea?

Regards,

Anze


> OK, got it: get_browser() - I can complement it with phpSniff to get all
> the data I need. :)



Reply With Quote
  #4 (permalink)  
Old 09-21-2005
Rauch Christian
 
Posts: n/a
Default Re: Browser sniffer for bots

Anze schrieb:
> Hmmm... :(
> Original question still stands.
>
> It seems that get_browser() only works if the administrator has enabled the
> browscap directive and pointed it to the right location of browscap.ini
> file - not an option for me as I host the pages with different providers.
>
> Any idea?
>
> Regards,
>
> Anze
>
>
>
>>OK, got it: get_browser() - I can complement it with phpSniff to get all
>>the data I need. :)

>
>
>

Look for $_SERVER['HTTP_USER_AGENT']

-rauch
Reply With Quote
  #5 (permalink)  
Old 09-21-2005
Anze
 
Posts: n/a
Default Re: Browser sniffer for bots

> Look for $_SERVER['HTTP_USER_AGENT']

Thank you, I know.
But I am looking for this info:
- browser family (Netscape, IE, Mozilla, Safari, Konqueror, GoogleBot, Yahoo
crawler,...)
- browser version
- is it a crawler or not (and preferably if it's a search engine crawler or
something else)

It has to be determined automatically from $_SERVER['HTTP_USER_AGENT'], but
in such way that it will be easy to keep the browser list current.

I was thinking about using browscap.csv and implementing a PHP class that
would use it... Basically I would like to have get_browser function
functionality but without needing the admin rights on the server.

PhpSniff is really close, it would just need crawlers (I also don't know if
it's up-to-date).

Any idea would be appreciated...

Regards,

Anze
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:02 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0