well i have a shoutcast server running on my pc it's all working with port fowarding and stuff but i want to use some php to test if the port is open or closed(running or shutdown)
using
https://www.grc.com i have seen that their script does just what i want but i'm looking for some php to do something similar,
i found this
code:
<?
$ip = "http://247.212.233.220"; // IP Here
$port = 8000; // Port Here
if(fsockopen($ip, $port, $errno, $errstr, '10'))
echo "The server is <font color='green'>Online</font>!";
else
echo "The server is <font color='red'>Offline</font>!";
?>
but even if the port is open and
https://www.grc.com says it's open the php script says it closed can some one help?