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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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. :) |
|
|||
|
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 |
|
|||
|
> 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 |