russthebarber Posted December 2, 2011 Share Posted December 2, 2011 I am just setting up a db to catch user info on my site. After some testing all is working except that when I use Safari, my log wrongly shows that I am using Firefox. I have been scanning the web for a solution but all workarounds I have found seem to be very out of date. Can anyone help with this? here is the code I am using: //logs user info to db $browser = $_SERVER['HTTP_USER_AGENT']; $time = $_SERVER['REQUEST_TIME']; $refer = $_SERVER['HTTP_REFERER']; $page = $_SERVER['PHP_SELF']; $pageQuery = $_SERVER['QUERY_STRING']; $ip = $_SERVER['REMOTE_ADDR']; Quote Link to comment https://forums.phpfreaks.com/topic/252268-_serverphp_self-safari-showing-as-firefox/ Share on other sites More sharing options...
Zane Posted December 2, 2011 Share Posted December 2, 2011 Check out PHP's get_browser function Quote Link to comment https://forums.phpfreaks.com/topic/252268-_serverphp_self-safari-showing-as-firefox/#findComment-1293315 Share on other sites More sharing options...
russthebarber Posted December 2, 2011 Author Share Posted December 2, 2011 Thanks. I have just seen that if you look right to the end of the returned string, you get more specific browser info. Will have to research what all the other stuff means. Quote Link to comment https://forums.phpfreaks.com/topic/252268-_serverphp_self-safari-showing-as-firefox/#findComment-1293324 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.