Re: fopen, fsockopen on my virtual host

From: Date: Mon, 31 Jan 2005 18:44:03 +0000
Subject: Re: fopen, fsockopen on my virtual host
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-207792@lists.php.net to get a copy of this message
Richard Lynch wrote:
Al wrote:
I've got a script that fetches a stream from a file on our virtual host. Its been working fine; but, yesterday they changed something and it no longer works.
Can you define "no longer works" a bit more clearly... Error messages? Just times out? What?
$fp= fsockopen("www.oursite.org", 80, $errno, $errstr, 30); I can use any remote site and fscockopen works fine. Anyone have a suggestion as to how I deal with this problem?
if ($errno){ error_log("fsockopen errored out with # $errno: $errstr"); }
Here is my error report:
Warning: fsockopen(): unable to connect to www.restonrunners.org:80 in /www/r/reston/htdocs/phpList/PQ/PQutility.php on line 364 Operation timed out (60)
fsockopen() works fine with remote URLs and even "localhost"; but, not with our own URL. I'd use "localhost" but, I need to attach some GET arguments and I can't figure out a way to do it. e.g., $str= file_get_contents(localhost?page=processqueue&login=Pmin&password=xxxxx)

« previous php.general (#207792) next »