Jump to content
MakeWebGames

Recommended Posts

Posted

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!

Posted

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!

Posted

I use captcha for registration, gym use and crime use and anywhere else in my game(s) where a bot/macro could be used to give a player an unfair advantage. Its not foolproof but it does stop the majority of players making those that do get around it stand out.

Posted
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 :)

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...