Algorithms Arrays Passwords Uncategorized
Commerce Uncategorized
Databases Abstraction Layers Informix LDAP MS SQL MySQL ODBC PostgreSQL Uncategorized
Date & Time Calculators Conversion Translation Uncategorized
Discussion Chat Forums Guestbooks Polls Uncategorized
Email Validation Uncategorized
External Uncategorized
Files and Directories Uncategorized
Games Uncategorized
Graphics 3-D Graphs Resizing Thumbnails Uncategorized
HTML Forms Menus & Navigation Source Viewers Tables Templates Uncategorized
HTTP Authentication Cookies File Uploading Uncategorized
I18N Uncategorized
Math Uncategorized
Miscellaneous Uncategorized
Searching and Trees Uncategorized
Security Uncategorized
Text Uncategorized
Utilities Calendars Counters Link Checkers Weather Uncategorized
XML Uncategorized
| php sample source codes |
|---|
|
This code will check for a cookie. If none is found it will verify User ID and Password and then give the user a cookie for next time (or other parts of the site). In addtion this code will automatically direct the users browser to a page of your choice after authenticating. This code uses MySQL.
|
|
Authentication using cookies and filebased password/login list. <br>It took me some time to understand, how cookies can be used properly. I think this might help you; at least to start with. <br> Instead of redirecting to a new file, you can use the whole as a function and return succeeded authentication. <br>Be aware of declaring all nescessary variables as global.<br>Of course, the login/passwd list can certainly be taken from within a database.
|
|
use this function to ask for a login for first time visitors and track their
login/password information in cookies on the client's side. you will still
need to inform the user about enabling cookies. further, there is only a
a check of login/password against the contents of the cookie, once it is set
for longer than just the session.
|
|
complete auth system in one file. Just include this file, after you have modified the definitions, in any pages you want protected and authentication will be enabled.
|
|
I received some e-mail asking what code should be placed on other pages of the website using my Authenticator with Cookies and Redirect. This code should appear before the HTML Tag on any page you want protected.
|
|
This selection of PHP files will allow you to implement a "member's only" area in your web site, complete with recognizing re-entering members and new member form. Uses MySQL back-end.
|
|
simple and easy, and effective way to enable password authentification on your php form scripts.
|
|
This authentication class is highly configurable, very secure, and works with any relational database.
|
|
<b>Problem:</b> PHP authentication doesn't protect whole directories, HTTP authentication isn't automated (you always have those inflexible txt files)
<b>Solution:</b> Using this script lets you update your .htpasswd file taking usernames and passwords from a MySQL source
Just execute this script everytime a password/username combination is newly entered or changed.
It's maybe not the "perfect" way, but the only way I found to protect whole directories with MySQL data.
|
|
Secure User Authentication, Supports banning, deletion, adding, etc. Based on MySQL Backend.
ALWAYS LATEST CODE!
http://www.phpportalen.net/viewtopic.php?t=10568#56993
|
|
I intentionally used this function auth() to authenticate users from a login form and keep their information within the session, while passing the SID by GET or an other method.<br><br>
At least an introduction to sessions. :-b
|
|
Simple UNIX SMB authentication. This script allows web site users to be managed by a Windows NT/2000 or SAMBA primary domain controller.
*** Please note that this PHP script will not execute correctly if placed on a Windows web server. ***
Requires the installation of Samba (http://samba.sourceforge.net/) to validate usernames/passwords. The actual Samba server software does not need to run at all. It only uses the small "smbclient" binary installed with Samba. The only other requirement is that a file named "phpauth" be placed in the SMB logon servers NETLOGON directory (\\SERVERNAME\NETLOGON\). The file must contain only the word 'allow'.
This script basically works exactly the same way as Squid Proxy Cache's SMB authentication does. It has been tested on Mac OS X with Samba 2.2.2 and Windows NT 4 SP 6. If you have any problems, please email me and I'd be happy to help out. Please note that this PHP script will not execute correctly if placed on a Windows web server.
|
|
Test if site is online with customer error message.
|
|
I've found the need to password protect a few webpages and didn't feel like setting up a "real" authentication scheme. This is pretty cheesy, but good for someone who has a webpage and wants to make the information only available to a select few.
|
|
<b>Easy to use PHP & mySql user tracker .</b><br>It combines a cookie with an id with a database to store informations . The cookie will hold an ID and then the vars and everything is read and written to the database .
Perfect for user tracking and login systems .
<b>Rate it .</b>
I will share more code if appreciated properly .
|
|
PHP and MySQL running together
for username/password check.
|
|
On the login page: If the user is already logged on or if there
are cookies or there is a valid session, he
will be redirected to the member page. If the
log in form isn't complete or the username or
the password is wrong, the function will
return the error variable.
In areas for members only: If the user isn't logged on or there aren't any
cookies or the session terminated, the user
will be redirected to the login page.
In the logout page: The user will be logged out.
|
|
add and select users on a mysql database
|
|
If you create regfistartion form and you wanto to check wheter the login member exist, password verify check and valid email check, then this function will help you with perform those task.
|