Jump to content

file_get_contents getting webpage without file ext "index.htm"


farkewie

Recommended Posts

Hi,

 

I want to display some of the information of a page i have that can only be accessed through a port.

 

To view the page i would browse to http"//IP:PORT there is not file extension. How can i do this? I have tried include and file_get_contents


$page = file_get_contents("Http://IP:PORT");

print $page;

 

 

Here is the error i get.

Warning: file_get_contents(http://IP:PORT) [function.file-get-contents]: failed to open stream: HTTP request failed! in T:\WebRoot\index.php on line 31

I am trying to access free download managers web interface. I only want to display part of it on my page.

 

When i say there is not ext is exactly that. You access it through "IP:PORT in the servers folder it has an index file i have tried using and browsing to IP:PORT/index.html. but page cant be displayed

 

From what i can see FDM  server reads the file in to memory and serves it as a stream.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.