PHP Login Example

DON'T post new tutorials here! Please use the "Pending Submissions" board so the staff can review them first.
Locked
User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

PHP Login Example

Post by ayu »

This is one of my Login scripts that i made for my site, this one is the most important one and is the one i am making the most secure one.

It has MD5 password encryption, and also it has bruteforce protection, going to improve the bruteforce protection though.

Anyway, it consists of 4 files

index.php: The file you want to login to

config.php: The file containing all the Mysql database info and some other functions important to the script.

login.php: The login script.

bf.php: The anti bruteforce page.

you will need a Mysql database to use it and at least PHP 5.0, you will need a table called "authadmin" with the colums "user" and "pass"

First we have the index.php. And the part i have so far for it is just the authentication part. It checks if you are allowed to use it or not, pretty simple.


index.php HERE


Then we have config.php that contains the mysql connection info and a filter function.

config.php HERE


Next up is the login.php which contains the authentication functions

login.php HERE

And last we have the bf.php, nothing special about it ^^

bf.php HERE

When the HTML filter on Suck-o has been cooled down i will explain some of the important functions more ^^

User avatar
sherlock
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 109
Joined: 12 Jun 2007, 16:00
16
Location: sydney

hey

Post by sherlock »

are you going to have a member sign up feature too? if you put that on . i will use it for sure :)

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: hey

Post by ayu »

shellshock wrote:are you going to have a member sign up feature too? if you put that on . i will use it for sure :)
yeah i have it done ^^ i can post it soon, will have to edit the one i post though since i have it kinda built into my site
"The best place to hide a tree, is in a forest"

TheKingOfHearts
Moderator
Moderator
Posts: 901
Joined: 18 Sep 2006, 16:00
17
Location: on my Throne
Contact:

Post by TheKingOfHearts »

very nice
might use it someday
i was looking for something simple
good job :)
[url=http://img338.imageshack.us/img338/2034/oopsrg8.gif]/sig[/url]

User avatar
Tesla1990
Newbie
Newbie
Posts: 1
Joined: 11 Feb 2008, 17:00
16

Post by Tesla1990 »

Links are dead :(

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

ah yes, that domain is dead since a long time... =/

I'll remake the code and upload it to the codebin on suck-o =)
"The best place to hide a tree, is in a forest"

User avatar
h4di
Newbie
Newbie
Posts: 3
Joined: 26 Aug 2009, 16:00
14

Post by h4di »

Link are dead!!!

User avatar
3XTORTION
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 246
Joined: 29 Jul 2007, 16:00
16
Contact:

Post by 3XTORTION »

P4 calm down ! You should be more friendly with newcomers...Shouting at the dude won't make you the boss in his eyes :roll:

H4di,just look at the fucking date ^^ .If you're really interested in this topic open another thread and ask for it :wink:

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

Actually this code is not available anywhere any more :)

I don't have any time at the moment to upload anything new, and the code I have now is specifically made for some of my projects. But if someone wants a new example code, then feel free to create a thread about it and we will see what we can do!

This thread is old and dirty (not in the good way), so we'll just lock it and forget it ever existed : )
"The best place to hide a tree, is in a forest"

Locked