I was wondering if anyone knew of a way to call a web site using fopen. Let
me tell you how things are set up and what I'm trying to do. I can call
fopen to read a site and then echo it back out. That's not a problem. The
problem I run into is when I try to go to a restricted area of a site.
For example, in my Apache httpd.conf file I have it set up to where I have a
directory that is only accessible from certain IP addresses, one of which is
127. (the localhost). The script I'm running is located on the server and
the web site I'm trying to access via fopen() is on the same server.
Therefore, I'm thinking that the php script should have access to read the
site's restricted directory. For some reason it does not have access.
I was wondering if there was a way around this or am I just doomed to never
be able to access the directory via
fopen("http://someurl.com/somedirectory","r"); ??
Why can't you just do...
fopen("http://127.0.0.1/somedirectory", "r");
?
Odds are when you do it the other way "your" IP address is *NOT*
127.0.0.1, but whatever your "Internet" IP address is.
-philip
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php