// #################### Start is os ########################## // os detection script function is_os($os) { global $_SERVER; static $is; if (!is_array($is)) { $useragent = strtolower($_SERVER['HTTP_USER_AGENT']); $is = array( 'linux' => 0, 'mac' => 0, 'windows' => 0, 'webtv' => 0 ); // detect windows if (strpos($useragent, 'winnt,win32,windows,32bit') !== false) { $is['windows'] = 1; } // detect macintosh if (strpos($useragent, 'mac') !== false) { $is['mac'] = 1; } // detect linux if (strpos($useragent, 'linux,x11,u,i686') !== false) { $is['linux'] = 1; } // detect web tv if (strpos($useragent, 'webtv') !== false) { preg_match('#webtv/([0-9\.]+)#', $useragent, $regs); $is['webtv'] = $regs[1]; } } // sanitize the incoming os name $os = strtolower($os); if (substr($os, 0, 3) == 'is_') { $os = substr($os, 3); } } // #################### End is os ##########################
if (strpos($useragent, 'winnt,win32,windows,32bit') !== false)