Re: fopen never ends?
| From: | Nathan Rixham | Date: | Tue, 19 Feb 2008 12:45:17 +0000 |
| Subject: | Re: fopen never ends? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-269606@lists.php.net to get a copy of this message | ||
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)) {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 Nathanecho "ok";} else {echo "failed";} Best Regards, Paul van Brouwershaven