Click to See Complete Forum and Search --> : PHP finding the OS [resolved]
Acidic
May 21st, 2004, 12:09 PM
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?
visualAd
May 21st, 2004, 12:31 PM
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.
<?php
echo ('You are using: ' . $_SERVER['HTTP_USER_AGENT']) ;
?>
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.
Acidic
May 21st, 2004, 03:30 PM
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
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.