Lithium Posted April 10, 2012 Posted April 10, 2012 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! Quote
Dave Posted April 11, 2012 Posted April 11, 2012 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! Quote
rulerofzu Posted April 11, 2012 Posted April 11, 2012 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. Quote
Spudinski Posted April 11, 2012 Posted April 11, 2012 Good work man, though... I would suggest that you randomize the position of text and lines for complexity. Quote
Lithium Posted April 11, 2012 Author Posted April 11, 2012 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 :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.