To get the system type in PHP, you can use the php_uname()
function. Here's an example:
main.php130 chars3 lines
The 's'
parameter passed to php_uname()
returns the operating system name. You can also pass other parameters to get additional system information, such as 'n'
for the network name or 'r'
for the release number.
gistlibby LogSnag