I have been having problems with a curl script which works normally with
many different URLs but had a particular intermittant problem with a url
in the following format:
http://10.20.30.40/00000001/032/023112/filename.phtml?param1=paramvalue1¶m2=paramvalue2
etc etc.
The unusual thing about this URL is that is starts with an IP address.
I got a lot of failures to connect, so tried a different way to connect
as all I need is the page as a string:
According to php.net, the function 'file_get_contents()' should work if
allow_url_fopen is set to TRUE for the PHP installation.
'allow_url_fopen' is set to 1 in my php.ini file.
http://php.net/file_get_contents
http://php.net/allow_url_fopen
However, 'file_get_contents' also fails to connect to this particular
URL. It gives:
"failed to open stream: Connection timed out in
*/home/shortsta/public_html/live48_test.php* on line *75*
*Warning*: feof(): supplied argument is not a valid stream resource in
*/home/mysite/public_html/testpage.php* on line *79*"
The target URL works perfectly and quicly if put directly into the
browser URL line.
Do you know of any other reasons for problems with such a connection?
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php