Oke i used this code for a realm status:
Code:
<?php
//Server Config>
$sip = "127.0.0.1";
$sport = "8129";
if(realm_status($sip, $sport) === false)
{
echo '<img src="img2/offline.png">';
}
elseif(realm_status($sip, $sport) === true)
{
echo '<img src="img2/online.png">';
}
else
{
echo '<img src="img2/offline.png">';
}
function realm_status($host, $port)
{
error_reporting(0);
$etat = fsockopen($host,$port,$errno,$errstr,3);
if(!$etat)
{
return false;
}
else
{
return true;
}
}
?>
my website is hosted on godaddy and my server is on a Ubuntu Server 10.04 machine..
but the script is showing me all the time offline