Re: [PHP] Question regarding OS

2006-06-27 Thread Jochem Maas
Mayank Maheshwary wrote:
 Hi,
 
 Is there a function that can detect the OS on which the script is running?

yes.

php_uname()

read about it here http://php.net/manual/en/function.php-uname.php
and then read 10 pages either side just for fun :-)

 
 Thank you.
 
 M.
 

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



Re: [PHP] Question regarding OS

2006-06-27 Thread Ligaya Turmelle

Jochem Maas wrote:

Mayank Maheshwary wrote:


Hi,

Is there a function that can detect the OS on which the script is running?



yes.

php_uname()

read about it here http://php.net/manual/en/function.php-uname.php
and then read 10 pages either side just for fun :-)



Thank you.

M.





Ha - never heard of that function... Thanks.

--

life is a game... so have fun.

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

Re: [PHP] Question regarding OS

2006-06-26 Thread Ligaya Turmelle

Mayank Maheshwary wrote:

Hi,

Is there a function that can detect the OS on which the script is running?

Thank you.

M.


The OS of the server maybe $_SERVER['SERVER_SOFTWARE'] - *shrug*
The OS of the client is not available - server side - remember.

--

life is a game... so have fun.

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

Re: [PHP] Question regarding OS

2006-06-26 Thread tedd
At 11:46 AM +1000 6/27/06, Ligaya Turmelle wrote:
Mayank Maheshwary wrote:
Hi,

Is there a function that can detect the OS on which the script is running?

Thank you.

M.

The OS of the server maybe $_SERVER['SERVER_SOFTWARE'] - *shrug*
The OS of the client is not available - server side - remember.


???

If you mean, the server where your php script is running, then 
$_SERVER['SERVER_SOFTWARE'].

If you mean, what the OS and browser of the client who is viewing the product 
of your script, then try $_SERVER('HTTP_USER_AGENT').

If I remember correctly, these are not guaranteed across all servers -- but 
are typical.

tedd
-- 

http://sperling.com  http://ancientstones.com  http://earthstones.com

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