Re: http request problem

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

 



===ORINGIAL===
hi all,

I got problem in getting file content. the file is located at another server
(tomcat) and it is a jsp file.
i don't know why i keep getting the same error message file accessing that
file but
while i am trying to access to another file, from another server it run
perfect.
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

take note that the text in bold is part of the page contents.
i don't understand why i cant get the whole content and keep getting this
error.
I hope somebody can help me out.

Thank you

Regards,
Kencana
===END ORIGINAL===

I tried following code but it gives the same 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)) {
    $contents = fread($handle, 819200);
    echo $contents;
  }

I tried opening the given URL directly, but this url seems to be a broken
link. If you try any other link, it will work

--
Regards
Fahad Pervaiz
www.ecommerce-xperts.com
(Shopping Cart, Web Design, SEO)

[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