Re: Re: http request problem
| From: | Curt Zirzow | Date: | Wed, 03 Jan 2007 07:52:39 +0000 |
| Subject: | Re: Re: http request problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246420@lists.php.net to get a copy of this message | ||
On 1/2/07, Fahad Pervaiz <fahad.pervaiz@gmail.com> wrote:
this is the error message i get: PHP Warning: file_get_contents( http://123.123.1.2:8008/V3JRoute?slot=1&startX=103.880764&startY=1.335458&endX=103.886297&endY=1.334953&routeType=1&format=2 ) [function.file-get-contents]: failed to open stream: HTTP request failed! $5$13:53:22,13:53:22,13:53:22,13:53:22,13:53:22$0.0,0.0,0.0,0.0,0.0$Depart on,Turn sharp left onto,Continue on,Turn right onto in C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\phpviewersample\xmlaccesstrial.php on line 5 ===END ORIGINAL=== I tried following code but it gives the same errorSame error?
$link=" http://123.123.1.2:8008/V3JRoute?slot=1&startX=103.880764&startY=1.335458&endX=103.886297&endY=1.334953&routeType=1&format=2 "; $handle2= fopen($link,"r"); $contents = ''; while (!feof($handle2)) {I get invalid handle with this code right at the above line. And... telnet 123.123.1.2 8008; never responds if $link doesn't have carriage returns or line feeds, it waits for a long time and repeats about an invalid handle as well.
I tried opening the given URL directly, but this url seems to be a broken link. If you try any other link, it will worki'm suspect at the actual ip used, the ip in question seems odd. Curt