Jump to content
php.lv forumi

Server status


Kikisss

Recommended Posts

Kaa izdariit taa lai skripts neizvada IP bet gan piem servera nosaukumu?

(atvainojiet nav LV shrifta)

 

$ip = "91.90.xxx.xxx";
$port = "80";
if (! $sock = @fsockopen($ip, $port, $num, $error, 5))
echo '<B><FONT COLOR=red>Offline</b></FONT>';
else{
echo '<B><FONT COLOR=lime>Online</b></FONT>';
fclose($sock);
}

Edited by Kikisss
Link to comment
Share on other sites

skripts izvada pareizi tikai pielaidu kljuudu saakumaa jo taisu to kaa php fusion paneli.

ja kaadam vajag to tad luudzu -

openside("Server_status");
 echo 
"(servera nosaukums) server is ";
$ip = "IP adrese";
$port = "Ports";
if (! $sock = @fsockopen($ip, $port, $num, $error, 5))
echo '<B><FONT COLOR=red>Offline</b></FONT>';
else{
echo '<B><FONT COLOR=lime>Online</b></FONT>';
fclose($sock);
}
;
closeside();

Edited by Kikisss
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...