In this article we will learn how to created online/offline server status, mostly this php code function used in gaming site to show server available or not. In my emulate site I was created sample php snippet code to show server online/offline.

Click here to read sample code in txt format.

All you need is just this sample code:

$ip = “this.ismy.ip.number”;
$port = “portnumber”;

if ($check=@fsockopen($ip,$port,$ERROR_NO,$ERROR_STR,(float)0.5))
echo “MY OWN SERVER<br>”;
echo “<img border=’0′ src=’images/online.jpg’ alt=’ONLINE’>”;
echo “MY OWN SERVER<br>”;
echo “<img border=’0′ src=’images/offline.jpg’ alt=’OFFLINE’>”;

Sample result:


Just that! really simple right? he he he.. you can costumize and added anything to make it more beauty. Anyway if you like to play games or bored with life *lol* come to my emulate site and play games together.

Done, Have a good day 😀

Similar Posts:

Related Search Terms:

    Digg StumbleUpon Reddit Twitter RSS

If you're new here, you may want to subscribe to my RSS feed. You may copy or publish this article to your blog or other site as long you give credit link back to this site article. Thanks for visiting my blog!