Since a week ago I am getting this message when running one of my scripts:
Warning: fsockopen(): unable to connect to
www.clarin.com:8080 in /home/freehost/t35.com/n/a/nacion/p/anda2.php on line 9
Problem: 110
Have you disabled fsockopen feature?
Please help me
Marcos
My script
http://nacion.t35.com/p/anda2.php fetch a xml file from a remote site:
<?php
$str = '
http://www.lanacion.com.ar/herramientas/rss/index.asp?origen=2'; $url = parse_url($str);
$path = ($url['path']) ? $url['path'] : '/';
$port = ($url['port']) ? $url['port'] : '80';
if ($fp = fsockopen($url['host'], $port, &$errno, &$errstr, 5))
{
fputs ($fp,"GET ".$url[path]." HTTP/1.0\r\nHost: " . $url[host] . "\r\n\r\n");
while (!feof($fp))
{
echo fgets($fp, 1024);
}
fclose ($fp);
}
else
{
echo "Problem: $errno";
}
?>