_server_software = isset($_SERVER['SERVER_SOFTWARE']) ? strtolower($_SERVER['SERVER_SOFTWARE']) : ""; return $this; } /** * Return true if server is Nginx * * @return boolean */ public function is_nginx() { if (strpos($this->_server_software, 'nginx') !== false) { return true; } return false; } /** * Return true if server is lighttpd * * @return boolean */ public function is_lighttpd() { if (strpos($this->_server_software, 'lighttpd') !== false) { return true; } return false; } /** * Return true if server is Apache * * @return boolean */ public function is_apache() { if (strpos($this->_server_software, 'apache') !== false) { return true; } return false; } /** * Return server platform name * * @staticvar string $_system * @return string */ public static function get_platform() { static $_system = NULL; if ($_system === NULL) { $_system = strtoupper(php_uname('s')); if ($_system == 'WINDOWS NT') { $_system = 'WINDOWS'; } } return($_system); } }