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

Posted by Peter Brodersen on 05/28/05 00:40

On Fri, 27 May 2005 13:57:12 -0500, in php.general jpaulson@sedl.org
(Jay Paulson) wrote:

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

Even if it is the same server you might not connect with "127.0.0.1"
as the source IP address - especially not if the other web site's host
name resolves to any other IP address than 127.0.0.1. Your tcp
connection might still be performed via the loopback-interface, but
your source IP address might still be the one of a network interface

Try to create a page on the second web site (that you want to access
thorugh fopen() ) that outputs the client's IP address. You'll
probably see that your source IP address is not 127.0.0.1.

--
- Peter Brodersen

 

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

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