You are here: .htacess and fopen « PHP Programming Language « IT news, forums, messages
.htacess and fopen

Posted by botho.willer on 09/30/07 11:12

Hello!
Some time ago I discovered a script on php.net that uses a fopen
handle on a .htaccess-protected directory to check the authorization
of a user. The crucial Code is this:

$handle = fopen("http://username:pw@domain.com/directory", "r");

(of course the username and password are variables entered by the
user)
I used this script to protect a admin-area for some time without any
problems.
But since some weeks the fopen fails even when the right "auth-data"
is entered. I think this error might be connected to the server
upgrade to php5 or any other change of the server config.
I already checked allow_fopen_url, but it's on.

So can anyone tell me why
$handle = fopen("http://username:pw@domain.com/directory", "r");
stopped working? Any server variable or change in the php-
specifications i don't know about?

Thanks,
Botho

 

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

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