Hello,
i am trying to set up a page which tells you if my radio server is online or not.
I have had a word with the people who host my radio, and they said the script works fine, but the host i am on "may block outbound connections.
Can anyone offer any advice on why i get this error:
Here is some code, line 25 is "$page .= fgets($scfp, 1000);"Warning: fsockopen(): unable to connect to 213.48.102.229:9150 in /home/sosolidp/public_html/radio_stats.php on line 25
PHP Code:$scfp = fsockopen("$scip", $scport, &$errno, &$errstr, 30);
if(!$scfp) {
$scsuccs=1;
echo''.$scdef.' is Offline';
}
if($scsuccs!=1){
fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
while(!feof($scfp)) {
$page .= fgets($scfp, 1000);
}


LinkBack URL
About LinkBacks



Reply With Quote


Bookmarks