The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Hi,
i`m using some php code to get servers` uptime, and here is it: Code:
$fp = @fsockopen("12.34.56.78", "80", &$errno, &$errstr, 2); if ($fp){ $ufuptimex=@fopen("http://12.34.56.78/get.php","r"); socket_set_timeout($ufuptimex, 2); $ufuptime = @fgets($ufuptimex, 100); $ufuptime = '<font color=green><b>'.$ufuptime."</b></font>"; } else { $ufuptime = '<font color=red><b>Server out of service</b></font>'; } @fclose($fp); |
#2
|
||||
|
||||
I have also tried to use smth like this.
Code:
$fp = fsockopen ("www.xxx.net", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br>\n"; } else { fputs ($fp, "GET /xxx.php HTTP/1.1\r\n\r\n"); while (!feof($fp)) { echo fgets ($fp,128); } fclose ($fp); } |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|