Ec (2); & lt; html & gt; & lt; title) server running status instant display table & lt; title & gt; & nbsp; & nbsp; & lt; tableborder0 & gt; & lt; tr & gt; & lt; tdbgcolorliteredwidth100 % colspan & quot; 9 & quot; & gt; script ec (2); script
// This program must start php_sockets.dll
$ Port = array (80,110, 79 );
$ Filename = "host.txt ";
$ Fl = file ($ filename );
For ($ I = 0; $ I $ A = preg_split ('//', $ fl [$ I]);
$ Name [] = $ a [0];
$ Ip [] = $ a [1];
$ Yn [] = $ a [2];
}
For ($ j = 0; $ j Echo"
Server running status instant display table Set_time_limit (0 ); Echo strftime ("% y % m month % d ."); ?> |
Ip address |
Detection Time |
Ftp |
Telnet |
Smtp |
Dns |
Http |
Pop3 |
Finger |
$ Name [$ j] |
". Date (" h: I: s ")." | ";For ($ I = 0; $ I <7; $ I ++ ){If (substr ($ yn [$ j], $ I, 1) = "1 "){@ $ Result [$ I] = fsockopen ($ ip [$ j], $ port [$ I], $ serno, $ errstr, 1 );If ($ result [$ I]) {Echo"
Normal | ";} Else {Echo"
Failed | ";}} Else {Echo"
N/ | ";}}Echo"
";}?>
Note:
1. This detection table is a simple inspection of servers of each organization. It does not necessarily mean that the server can run normally.
2. n/a indicates no detection.
|