Parse HTTP_USER_AGENT w/o get_browser

My hosting provider does not want to configure their server to provide access to browscap.ini. This means I cannot use get_browser to parse HTTP_USER_AGENT. Is there an alternative way?
Who is Participating?
FlorisMKAuthor Commented:
Yes, HyperBPP, that is indeed the documentation on get_browser (available in many places besides the URL you posted), which states clearly that a browscap.ini file is required for get_browser to work. My provider has not configured the server to provide that access, so I need an alternative method of parsing HTTP_USER_AGENT.

Like I said in my question.
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

lutrovConnect With a Mentor Commented:
I've been successfully using a custom version of [PHP Sniffer]( over the last few years. Try it out and see if it suits.
FlorisMKAuthor Commented:
Thanks, hielo and lutrov; I'll have a chance to look into this next week. Btw, my main reason for wanting this functionality is to filter out the bots in my hit lists. If there's an even simpler way to identify bots in the HTTP_USER_AGENT, that would be even better. (Of course, I could preg_match on 'bot', 'spider', 'fetch' etc, but I was kinda hoping there's a more elegant solution.)
No, there's no value in trying to look for "bot", "spider", etc. You'll need to look around on the internet for the correct user agents trings. There's new one popping up all the time.
FlorisMKAuthor Commented:
Oh well. No elegant solution then, but thanks for your input, hielo and lutrov!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.