Page 1 of 1

PHP Operating System Detection

Posted: Mon May 09, 2005 8:26 am
by Catz
Hi All!

I have a custom popup script that works fine with Windows XP Professional, but not with XP Home. I want to add a php detection script that will detect wether the user is using XP Home or XP Professional and then redirect the user according to these variables. Any ideas how this can be done?

Thanks!

Posted: Mon May 09, 2005 9:26 am
by anjanesh
Your pop-up script is not dependent on the OS - its the Web Browser and its version you need to check.
you can do this either using JS or PHP.
Javascript : navigator.userAgent
PHP : $_SERVER['HTTP_USER_AGENT']

Posted: Mon May 09, 2005 2:25 pm
by John Cartwright
which are optional headers.. do not rely on them to exist.