get operating system

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

get operating system

Post by Nay »

I've searched all over google but I can't seem to find a function that tells me the client's operating system. I'm creating a counter system so I'd appreciate it if you can point me to other information-retrieving functions.

Thanks,

-Nay
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

$_SERVER['HTTP_USER_AGENT']

[php_man]get_browser[/php_man]() note: an option in php.ini must be enabled for this to work. It can't be turned on with .htaccess
Last edited by feyd on Mon Jun 21, 2004 12:52 pm, edited 1 time in total.
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

print_r($_SERVER)

HTTP_USER_AGENT I think is what u need.

edit- beaten again
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

the user agent won't always tell you the users Operating system
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

true.. but that's all you get from the browser that can have that information.
Post Reply