Jump to content

Recommended Posts

Posted

am not sure where to post this so I am posting it here.

 

I would like to show on my web site that my server is either on-line or off line same with Log-in server.  I need this in html if at all possible.  but any format will do if all I need to do is enter my IP address(es).  Will someone please help me with this?

 

WildAmos

Posted

This can be done through php scripts.

 

 

<?
$ip = "youriphere";
$port = "yourporthere";
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);
}
?>

 

replace "youriphere" with your IP

and "yourporthere" with your port

 

Every time it is executed, it checks if the server is online. If it is online, then the output text will be Online. If not, the output text will be Offline

 

 

taken from trap17.com

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...