Jump to content

Recommended Posts

2 questions:

 

1) I have a windows server and a linux server. There is a file foo.txt in windows server which is accessible form http, it means you can see the contents of it via browsers with a URL such as : mydomain.com/foo.txt

 

I tried to remotely read this file with php commands such as CURL, file_get_contents, fsockopen and ... . All work fine in localhost (Windows Vista php5 installed) and show me the contents of foo.txt in remote server, but when I run the same script on my linux server (redhat with php5 installed) the response was: 404 not found.

It means windows server have to different behavior for browsing same page. And the prospected behavior is to view the contents of requested file.

how do I solve it?

I have full access to both Windows and Linux server.

 

2) I write down a php Web-Feed aggregator. It reads file from a remote server using CURL. The problem is some sites like feedburner.com after specified count of requests in specified time period, will redirect requested page to another page like feed proxy.feedburner.com/blablabla . How do I handle this redirection?

 

 

Thanks,

r.Sharafi

Link to comment
https://forums.phpfreaks.com/topic/128847-problem-reading-remote-file/
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.