phpnow PHP probe Environment detection code, Phpnow probe
<?php/* http://phpnow.org yinzcn_at_gmail.com*/error_reporting (E_all); Define (' TimeZone ', +8.0); function _get ($n) {return isset ($_get[$n])? $_get[$n]: NULL;} function _server ($n) {return isset ($_server[$n]) $_server[$n]: ' [undefine] ';} if (_get (' act ') = = ' Phpinfo ') {if (fun Ction_exists (' phpinfo ')) phpinfo (); else Echo ' phpinfo () has been disabled. '; Exit;} $Info = Array (), $Info [' php_ini_file '] = function_exists (' Php_ini_loaded_file ')? Php_ini_loaded_file (): ' [undefine] '; if (_get (' act ') = = ' GetIP ') {$i = _server (' server_name '). _server (' remote_addr '). _server (' Server_software '). (Function_exists (' Mysql_close ')? Mysql_get_client_info (): ') '. _server (' Document_root '); $c = @file_get_contents (' http://phpnow.org/myip.php? '). Base64_encode ($i)); if (Preg_match ('/^\d+\.\d+\.\d+\.\d+$/', $c) = = 1) echo $c; else echo ' false '; Exit;} function Colorhost () {$c = array (' #87cefa ', ' #ffa500 ', ' #ff6347 ', ' #9acd32 ', ' #32cd32 ', ' #ee82ee '); $a = Str_split (_serve R (' server_name ')); $k = $l = 0; foreach ($a as & $d) {while ($k = = $l) $k = Array_rand ($c); $d = ' <b style= ' color: '. $c [$k]. '; ' > '. $d. ' </b> '; $l = $k; } return implode (", $a);} function Get_ea_info ($name) {$ea _info = Eaccelerator_info (); return $ea _info[$name];} function Get_gd_info ($name) {$gd _info = Gd_info (); return $gd _info[$name];} define (' YES ', ' <span style= ' color: #00800 0; Font-weight:bold; " >Yes</span> ');d efine (' NO ', ' <span style= ' color: #ff0000; font-weight:bold; " >No</span> ');? ><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >< HTML xmlns= "http://www.w3.org/1999/xhtml" >
The above is Phpnow PHP probe environment detection code, Phpnow probe content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!