I am developing a corporate website for my HSC Software Design and Development Major Project. I have a section of code to check if the user's browser was supported in a MySQL database and, if not, display a warning to them and log their browser type. This code was working (almost) perfectly using the get_browser function, displaying a message that looked a bit like this:
We detected that you're using Internet Explorer to view this site. We have not tested this browser and cannot guarantee full support. For best results we recommend Google Chrome.
Since a bit of messing around in httpd.conf and a few server restarts however, this code no longer works. It detects ever browser as being "". (just an empty string) Trying to figure out the source of the problem, I put a quick debug line in:
echo $_SERVER['HTTP_USER_AGENT'];
For some reason this returns the following in EVERY BROWSER:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
I would imagine that this is the cause of the problem, does anyone know why this might be?