|
||
|
|||||||
| Script Languages Perl/PHP/Python/Ruby so on and so forth. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
|
I was wondering if anyone has a script that will check passwords and usernames against a list put in the file itself.
E.G. the user goes to http://www.yoursite.com/passwordchec...ame&p=password then if the username/password combination match it displays "1" if they dont match then it displays "0" the info is stored in variables so like PHP Code:
![]()
__________________
Everytime a puppy gets hit by a car from me smoking I take another drag, point, and laugh. Last edited by Nott32; 01-28-2007 at 02:40 PM. |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Nov 2003
Location: Illinois, USA
Age: 22
Posts: 2,911
|
well first of all, you would never transmit a password through a URL, maybe its hash, but you should use POST instead and do you want this to be hardcoded into a php script or use a database or flatfile (that way you can easily add users or whatnot). Of course a database is the most flexible way to go, but a flatfile (another name for a text file), would also work.
Anywho, lets say you have the list as an array with key=username, value=password. And for your example's sake, you are passing them through GET PHP Code:
also you are going to want to check to make sure that the $_GET variables actually exist and are set before all this.
__________________
Useful links (Use them or die in a fire!!!): Ultimate Little Guide, C# Tutorials & Docs, RunUO Basic Scripts, Run UO How to..., Configure server for connections, Scripting for Dummies, Common Problem Solutions, FAQ Forum, RunUO Wiki, Basic Generics, Xml Tutorial |
|
|
|
|
|
#3 (permalink) |
|
Forum Expert
|
Thats close to the one I used to use lol thank you! You are a life savor once again...the site that had the source for the script I used went down and now I cant get it >_< for a new project and go figure the script was on my PC when it crashed so I didnt have a copy on my system....*Useless rambling goes on*
*Has to go to school *!!!HOORAY FOR SHORT DAY!!!
__________________
Everytime a puppy gets hit by a car from me smoking I take another drag, point, and laugh. |
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
Join Date: Nov 2003
Location: Illinois, USA
Age: 22
Posts: 2,911
|
yep no problem
its nice to finally have someone ask questions about php in here
__________________
Useful links (Use them or die in a fire!!!): Ultimate Little Guide, C# Tutorials & Docs, RunUO Basic Scripts, Run UO How to..., Configure server for connections, Scripting for Dummies, Common Problem Solutions, FAQ Forum, RunUO Wiki, Basic Generics, Xml Tutorial |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|