fusilli_jerry89 Posted January 2, 2010 Share Posted January 2, 2010 Hi, I am just wondering how the get_browser() function works? How does it know whether firefox, or internet explorer, or telnet is being used? Quote Link to comment https://forums.phpfreaks.com/topic/186917-how-does-get_browser-work/ Share on other sites More sharing options...
Mchl Posted January 2, 2010 Share Posted January 2, 2010 http://php.net/manual/en/function.get-browser.php Quote Link to comment https://forums.phpfreaks.com/topic/186917-how-does-get_browser-work/#findComment-987064 Share on other sites More sharing options...
fusilli_jerry89 Posted January 3, 2010 Author Share Posted January 3, 2010 Thank you, but I was actually wondering if someone could explain the browscap.ini file. Does a server just compare the information stored in its browscap.ini file with the information that the browser is sending to the server in its request packets? Is this information reliable? Like, couldn't a telnet connection send firefox-like information and trick the server into thinking it's firefox instead of telnet? Quote Link to comment https://forums.phpfreaks.com/topic/186917-how-does-get_browser-work/#findComment-987385 Share on other sites More sharing options...
MadTechie Posted January 3, 2010 Share Posted January 3, 2010 The browser sends the "HTTP_USER_AGENT" data, PHP uses that data to look up more info, and as the server relies on the client sending that data, it can be spoofed, So everything refers on $_SERVER['HTTP_USER_AGENT'], the browscap.ini is just extending info (a lookup from the reference if you will) Quote Link to comment https://forums.phpfreaks.com/topic/186917-how-does-get_browser-work/#findComment-987422 Share on other sites More sharing options...
fusilli_jerry89 Posted January 3, 2010 Author Share Posted January 3, 2010 The browser sends the "HTTP_USER_AGENT" data, PHP uses that data to look up more info, and as the server relies on the client sending that data, it can be spoofed, So everything refers on $_SERVER['HTTP_USER_AGENT'], the browscap.ini is just extending info (a lookup from the reference if you will) Thank you. I'll chew on that . Quote Link to comment https://forums.phpfreaks.com/topic/186917-how-does-get_browser-work/#findComment-987453 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.