Jump to content
MakeWebGames

a simple captcha


Lithium

Recommended Posts

I've seen a few requests floating around for a login captcha. so here it goes, a very simple one that does the work just fine.

(Despite this is on MCC thread this is usable pretty much everywhere!

 

Create a file called captcha.php with this code

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then inside the login form get some space for the image using

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

and~next the input for the code

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

After this, wherever you check the credentials use $_POST['code'] from the input and compare it to $_SESSION['code']

A final note, you might need to re-adjust file size and colors to suit your needs!

Link to comment
Share on other sites

I've never been a massive fan of login captcha's because they just slow down users being able to access the game along with pretty much making auto login plugins in browsers useless. It is all preference on the site owners end I guess.

None the less good job, easy and simple code!

Link to comment
Share on other sites

Good work man, though...

I would suggest that you randomize the position of text and lines for complexity.

that could've been an option, though the version i use (this was trimmed down to the simplest version possible ;)), i encrypt the string just before the post so any automated attempt, would fail unless using rainbow tables :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...