How can PHP find the OS running on the visitor's system?
How can you edit this on your local machine to make the server think you have a different OS?
Printable View
How can PHP find the OS running on the visitor's system?
How can you edit this on your local machine to make the server think you have a different OS?
Use the HTTP user agent string. This is what the browser sends along with every request. It includes information about the browser they are using and the operating system and other things like toolbars installed and anything vendor specific.
You can change the user agent string in most browsers. You can download an extension for firefox and for IE you need to change a registry value.PHP Code:<?php
echo ('You are using: ' . $_SERVER['HTTP_USER_AGENT']) ;
?>
I know about UA strings. I didn't know the OS is stored there too. Thanks.
And I already have the extension for that.
Thanks