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

Link to comment
Share on other sites

What you mean by "there's no extension" ? If there's no extension, it's not a file - if it's not a file, how can you say that you have a "page" ?

Can you be more specific ? What you want to retrieve ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.