What is a PHP/web-based (cookie) authentication system/set of scripts that can be integrated into an existing website?

I'm looking for a safe, pre-built cookie based (instead of session based) authentication system that I can make use of to password protect some websites for simple authentication.

Cookie based is preferred but it can be anything. Basic authentication systems, where users login, and reset passwords, etc. have been created and recreated a 1000 times over and I don't want to do the same - I just want to use something that works.

Something that would allow me to copy a couple lines of PHP code to the top of a PHP file and by doing that enforce security on that file.
 
Any suggestions?

ctangentAsked:
Who is Participating?
 
Ray PaseurConnect With a Mentor Commented:
ctangent:

Buy this book:http://www.sitepoint.com/books/phpmysql1/

I followed its advice - straightforward and easy to implement.  Now I have a pre-canned and reusable set of scripts.  Register, Login, Logout, Remember-me, Change Password, etc., including broadcast email are all supported.  When I want to protect a script I add one line of code, either of those below.

Also, consider OpenID
http://en.wikipedia.org/wiki/OpenID

HTH, ~Ray
access_control();
 
admin_access_control();

Open in new window

0
 
Loganathan NatarajanLAMP DeveloperCommented:
better try to use SESSION... cookies are less security than sessions way.,

ref.http://www.sitepoint.com/article/users-php-sessions-mysql
0
 
Loganathan NatarajanLAMP DeveloperCommented:
0
 
Loganathan NatarajanConnect With a Mentor LAMP DeveloperCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.