Re: fopen never ends?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul van Brouwershaven wrote:
When you run the folling script, it will never ends?

I have seen this more then once, I know that there is no service running at the target host, but why is the script not printing the failed message?

It's only with a few ip-number I have this problem.

if ($fp = fopen('https://81.23.227.9', 'rb', false)) {
        echo "ok";
} else {
        echo "failed";
}

Best Regards,

Paul van Brouwershaven

I don't think this is a php problem, just load the url up in a browser and you'll see the same, appears to be a misconfigured server at the otherside - probably confused about not being passed a name based "host" header in the request.

Perhaps concider moving to fsockopen or stream_socket_client with timeout parameters to solve your issue.

Many Regard

Nathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux