You are here: Re: [PHP] fopen for http:// « PHP « IT news, forums, messages
Re: [PHP] fopen for http://

Posted by Rory Browne on 05/28/05 01:33

On 5/27/05, Jay Paulson <jpaulson@sedl.org> wrote:
> Hello all-
>
> 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.
Define "restricted area". How is it restricted? Using Login Forms?
Using HTTP Authentication? Using .htaccess to filter using IP
Addresses?

>
> 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.
What errors are you getting? Do you get the same errors, when you
access the site using a Browser? Are you accessing the site via
someurl.com or localhost? If you're using someurl.com, and the ip
address of someurl.com is 1.2.3.4, then you'll need to add 1.2.3.4 to
the list of allowed ip addresses. Your server probably doesn't
recognise that 1.2.3.4 is actually the same as 127.x.x.x when deciding
to allow or deny.

>
> 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"); ??
>
> Thanks.
> Jay
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация