i have made a script to get a bit of text from a webpage but the problem is that i can't get it to connect as the webserver is running on port 8000...
the code i have is ::
<?
$file = fsockopen ("paradio.secnet.dk", 8000);
//$file = fopen ("http://paradio.secnet.dk:8000/" , "r");
if (!$file) {
echo "Server not accessable!";
exit;
}
fputs ($file, "GET /index.htm HTTP/1.0\r\n\r\n");
while (!feof($file)) {
$line = fgets ($file,1024);
if (eregi ("<font class=default><b>(.*)</b></td>", $line, $out)) {
break;
}
}
fclose ($file);
echo $out[1];
?>
but it doesn't work 🙁
anyone know how to fix it?