This is funny -- I see $_SERVER["HTTP_UA_OS"] in the output of phpinfo(),
and naturally assumed it was part of the $_SERVER superglobal array.

This definitely isn't the first time I've seen a discrepancy between what
phpinfo() shows in terms of server/apache/environment variables, and what
you can actually USE in a script.

I mentioned it in the first place because I didn't see $_ENV["OS"] in
phpinfo() output, or in the manual.

I'd love to be able to use phpinfo() as the guide ... But it usually takes
more experimenting than that. I suppose this is one of those times! : )

-Clay



> From: "Brian McGarvie" <[EMAIL PROTECTED]>
> Date: Wed, 19 Jun 2002 10:29:25 +0100
> To: "Clay Loveless" <[EMAIL PROTECTED]>, "PHP-General"
> <[EMAIL PROTECTED]>
> Subject: RE: [PHP] catch the client OS user logon from php script
> 
> does... $_SERVER["HTTP_UA_OS"] exist?
> 
> I can't see that ne where and when I try to use it t's blank...
> 
> Also... I was using that as an example to put him on the right track...
> afterall nuthing is learnt if your given it on a plate...
> 
> if you want the exact OS, you need to extract it from
> 
> $user_agent = $_SERVER["HTTP_USER_AGENT"];
> 
> Here is a snippet to do so.
> 
> $user_os = ltrim(substr($user_agent, strrpos($user_agent, ";")+1,
> strrpos($user_agent, ")")-(strrpos($user_agent, ";")+1)));
> 
>> -----Original Message-----
>> From: Clay Loveless [mailto:[EMAIL PROTECTED]]
>> Sent: 19 June 2002 10:13 AM
>> To: PHP-General
>> Subject: Re: [PHP] catch the client OS user logon from php script
>> 
>> 
>> Edy,
>> 
>> If you're referring to the OS a visitor to your site is using
>> (not the OS
>> your PHP is running on, which you probably know), you'd want:
>> 
>>     $_SERVER["HTTP_UA_OS"]
>> 
>> -Clay
>> 
>> 
>>> From: "Brian McGarvie" <[EMAIL PROTECTED]>
>>> Date: Wed, 19 Jun 2002 09:54:39 +0100
>>> To: èdy kurniawan <[EMAIL PROTECTED]>,
>> <[EMAIL PROTECTED]>
>>> Subject: RE: [PHP] catch the client OS user logon from php script
>>> 
>>> $_ENV["OS"]
>>> 
>>> (see MANUAL for more that you can capture!)
>>> 
>>>> -----Original Message-----
>>>> From: èdy kurniawan [mailto:[EMAIL PROTECTED]]
>>>> Sent: 19 June 2002 9:44 AM
>>>> To: [EMAIL PROTECTED]
>>>> Subject: [PHP] catch the client OS user logon from php script
>>>> 
>>>> 
>>>> Dear PHP-ers,
>>>> 
>>>> How can I capture my client OS user logon via PHP script ?
>>>> 
>>>> TIA,
>>>> edyk
>>>> 
>>>> 
>>>> -- 
>>>> PHP General Mailing List (http://www.php.net/)
>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>> 
>>>> 
>>> 
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>> 
>> 
>> 
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to