PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
is that method infallible? Rather, what I mean is... what if I'm using a really obscure browser, like lynx or something? Every single method I've seen for browser detection had some weird caveat to it that makes it innefective in this or that situation.
It's a header sent by the client. Nothing prevents the client from sending User-Agent: rama lama ding dong or no User-agent string at all.
Therefore if your well-being depends on detecting the user's browser you have a problem.
onion2k wrote:If you don't have access to get_browser()'s browscap file and it's out of date, then http://sourceforge.net/projects/phpsniff/ is a reasonable alternative.
I just mentioned it to point out that browser sniffing can be a useless thing to do anymore because you never know what browser is really browsing your site.