Reply to Re: How to set the username/password when using http authentication?

Your name:

Reply:


Posted by Rik on 03/07/07 21:21

Els <els.aNOSPAM@tiscali.nl> wrote:

> Rik wrote:
>> Els <els.aNOSPAM@tiscali.nl> wrote:
>>> I can't seem to get that one to work.
>>> The passwords in the database are encoded though, would that cause t=
he
>>> trouble?
>>
>> Indeed, you'd have to use similar encoding on $_SERVER['PHP_PW']. The=
re
>> are various functions and encodings available to you, you'll have to =
=

>> know
>> which is used. (Often just md5 or sha1.)
>
> It's md5 indeed, but I have no idea how to incorporate that in the
> above piece of script..

Change:
>>>> if($row['passwd']=3D=3D$_SERVER['PHP_PW']) $verified =3D true;
To:
if($row['passwd']=3D=3Dmd5($_SERVER['PHP_PW'])) $verified =3D true;

-- =

Rik Wasmus
Posted on Usenet, not any forum you might see this in.
Ask Smart Questions: http://tinyurl.com/anel

[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

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