Reply to Re: [PHP] Fwd: fopen for http://

Your name:

Reply:


Posted by "Richard Lynch" on 06/01/05 09:02

fopen() most likely is not sending the same kinds of headers that an HTTP
connection would send, which is what you are really checking in httpd.conf

(Which might not be all that secure, come to think of it...)

Anyway, you should dump out the data you test in the restricted page, and
surf to it, and try to use PHP to get it, and see what is different.

You might be able to "forge" the HTTP data using fsockopen/fputs/gets or,
probably easier, http://php.net/curl once you figure out what data/headers
need to get sent for your restricted site to respond.

It's all matter of finding the restricted site's ticklish spot, you see.

On Fri, May 27, 2005 1:08 pm, Jay Paulson said:
> 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.
>
> 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"); ??
>
> Thanks.
> Jay
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Like Music?
http://l-i-e.com/artists.htm

[Back to original 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

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