Try using the php_uname function...
<?php
echo php_uname('s');/* Operating system name */
echo "<br />";
echo php_uname('n');/* Host name */
echo "<br />";
echo php_uname('r');/* Release name */
echo "<br />";
echo php_uname('v');/* Version information */
echo "<br />";
echo php_uname('m');/* Machine type */
echo "<br />";
echo PHP_OS;/* constant will contain the operating system PHP was built on */
?>
Source - Determine Operating System - http://www.sitepoint.com/forums/showthread.php?t=510565
Another method is to use...
echo $_SERVER['SERVER_SOFTWARE'];
This returns the following string on my ibm t400 running Win 7 (64bit)...
Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0
Unfortunately, its returning WIN32 because I'm running the 32bit version of apache.
You can get general processor info (on a *nix server), by using the cmd...
echo system('cat /proc/cpuinfo');
You'll probably need to use a combination of the methods if you're planning on supporting many different OSes.