I am making a website and i have this www.22salon.com/test_login/test3/client.php i have a code that looks like this
<?php
$ip = "allexser.dnsalias.net"; //put your ipaddress here
$port= "43594"; //the port number
if (! $sock = @fsockopen($ip, $port, $num, $error, 5)) //Checks the server's status (43594 = port)
{
echo "<font>Offline</font>"; //When server status is offline, output this
}
else
{
echo "<font>Online</font>"; //Else, output this
}
?>
This code tells whether my RS private server is offline or Online but it doesnt work. it always shows offline. I know how to use this inside an html website so dont tell me that i am doing something wrong in html. All i know is that the script is wrong. all help is appreciated.