Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: [1]
Send this topic | Print
Topic: fsockopen feature disabled? fsockopen(): unable to connect  (Read 1949 times)
« on: October 07, 2005, 03:40:27 PM »
sjprec Offline
Newbie

View Profile
*
Posts: 2



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";
}

?>
Report to moderator   Logged

 
« Reply #1 on: October 07, 2005, 05:07:36 PM »
dragoneye_xp Offline
Newbie

View Profile WWW
*
Posts: 26



I don't think T35 allows that command anymore on free hosting because it got abused (or something) and people can use T35 as a proxy with that.  I got the same thing when I tried to make a script for my Mini-Browser to insert a control/title bar at the top of whatever page you're browsing.
« Last Edit: October 07, 2005, 05:10:42 PM by dragoneye_xp » Report to moderator   Logged
 
Pages: [1]
Send this topic | Print
Jump to:  

Powered by SMF | SMF © 2006-2008, Simple Machines LLC