Forum Moderators: coopster

Message Too Old, No Replies

read a url internally

         

ayushchd

7:05 am on Sep 3, 2008 (gmt 0)

10+ Year Member



hey all..
after a long time m posting..plz help me..
therez a page from where i read some data and import..
but nowadays the makers of that page have changed their settings..
when i go to that link externally , it says page not found..
if i click on a link to that page from within their website then the page opens..
as a result fopen function is not working..

is there any solution out to read the contents of that page?

omoutop

11:35 am on Sep 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



have you tried curl()? it might provide the help you need

henry0

12:23 pm on Sep 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



or wget() [gnu.org]
it mostly comes with most Linux flavors

wikipedia has also some direct to the point infos about it.

coopster

1:54 pm on Sep 3, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



but nowadays the makers of that page have changed their settings.

Did you recently add a firewall? If so, try adding the domain to your /etc/hosts file for the internal IP address.

omoutop

2:10 pm on Sep 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



as a result fopen function is not working.

based on this comment, I have thought of the following situations for this problem:

a. prevent hotlink to their site (especially for media files)
b. some sort of session/cookie validation that throws external visitors to page not found (or 303 header)
c. other site turned on the safe mode (thus disabling the fopen)

Firewall.... never thought of that :(

Live and learn every day

Anyango

4:14 pm on Sep 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can't it be simply the fact that they have put a check on the REFERRER string ? if referrer is their own site then load the page otherwise don't ?

coopster

6:49 pm on Sep 3, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Quite possibly, and most likely. I may have misunderstood the original question. I thought ayushchd was attempting to open a page "internally" meaning that the fopen() request was failing to load the page because of routing internally. I didn't consider this being an attempt to open the file from another's server. I thought it was an attempt on one's own server.

ayushchd

8:43 am on Sep 5, 2008 (gmt 0)

10+ Year Member



hey thanks all... but what worked out was :
Can't it be simply the fact that they have put a check on the REFERRER string ? if referrer is their own site then load the page otherwise don't ?

So special thanks to anyango..