captcha

How to validate captcha properly?

≡放荡痞女 提交于 2020-01-22 03:33:07
问题 I have login form that uses captcha verification. I am having trouble writing validation in my php file that will get error if captcha is not correctly inputted. Currently I have validation that if no captcha is inputted it shows error, but I when I type some wrong captcha the login proceeds and logs in user on to site. Here is my code and any help is appreciated. login.php <?php session_start(); require 'connection.php'; $username_error = ""; $password_error = ""; $captcha_error = ""; if($

Pure JavaScript/jQuery/HTML captcha

*爱你&永不变心* 提交于 2020-01-21 08:32:31
问题 can somebody sent me a link, or to provide me an example with pure Javascript/jQuery captcha. Because I can see a lots of examples with PHP/C# ... back end. But I need just Javascript . Thanks !! 回答1: I think this is not a good idea, because if validation is made in client (js), somebody can make a script to read the correct answer. EDIT Anyway, if you want a useless captcha, you can play with this: See in jsfiddle. HTML Pseudo-Human check. <br/>How much is: <input type="text" id="a"/> <br/

How does Google reCAPTCHA v2 work behind the scenes?

谁都会走 提交于 2020-01-18 18:25:03
问题 This post refers to Google ReCaptcha v2 (not the latest version) Recently Google introduced a simplified "captcha" verification system (video) that enables users to pass the "captcha" just by clicking on it. But how can it differentiate a bot from a person just by a click? As per this answer, (assuming a similar implementation), at first "recaptcha" generates a hidden key and attaches it to a hidden input element and also lazily renders a check box (not an actual check box input but a div )

How does Google reCAPTCHA v2 work behind the scenes?

我与影子孤独终老i 提交于 2020-01-18 18:11:10
问题 This post refers to Google ReCaptcha v2 (not the latest version) Recently Google introduced a simplified "captcha" verification system (video) that enables users to pass the "captcha" just by clicking on it. But how can it differentiate a bot from a person just by a click? As per this answer, (assuming a similar implementation), at first "recaptcha" generates a hidden key and attaches it to a hidden input element and also lazily renders a check box (not an actual check box input but a div )

php captcha session doesn't update

纵饮孤独 提交于 2020-01-15 07:26:06
问题 I have this code: captcha.php: session_start(); class Captcha { protected $code; protected $width = 35; protected $height = 150; function __construct() { $this->code = substr(sha1(mt_rand()), 17, 6); $_SESSION['captcha'] = $this->code; } function getCode(){ return $this->code; } function showImage() { // here comes the code that builds the image. // it works fine! } } $image = new Captcha(); $image->showImage(); And in my login form I have: <iframe src="includes/captcha.php" frameborder="0"

create random curve lines in an image for captcha

浪子不回头ぞ 提交于 2020-01-14 19:35:21
问题 I want to create an script for creating captcha images similar to the captcha used by some popular websites like in the image below. I have created the script which generates captcha but I want to make it somewhat like below And I want to add those random lines in the image but I cant figure our how can I achieve it,Please suggest how to do it in PHP.or any similar open-source project I can reference to. 回答1: The below code gives you a starting point to do what you want. Note that this gives

create random curve lines in an image for captcha

天大地大妈咪最大 提交于 2020-01-14 19:35:08
问题 I want to create an script for creating captcha images similar to the captcha used by some popular websites like in the image below. I have created the script which generates captcha but I want to make it somewhat like below And I want to add those random lines in the image but I cant figure our how can I achieve it,Please suggest how to do it in PHP.or any similar open-source project I can reference to. 回答1: The below code gives you a starting point to do what you want. Note that this gives

getMFAResponseForSite - rendering array as a captcha image

人走茶凉 提交于 2020-01-14 03:09:46
问题 I'm working with Yodlee MFAs, in this case, captcha, and I'm wondering how to render the image field from this JSON response: { "isMessageAvailable":true, "fieldInfo":{ "responseFieldType":"text", "imageFieldType":"image", "image":[ 66, 77, 58, 116, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0, 0, -91, 0, 0, 0, 45, 0, 0, 0, 1, 0, 32, 0, 0, 0, 0, 0, 4, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -5, -1, 0,

Google reCaptcha IE8

半世苍凉 提交于 2020-01-11 09:09:14
问题 Is Google reCaptcha v2 supported in Internet Explorer 8? If not is there any suitable Internet Explorer 8 compatible captchas? I am seeing a issue where the reCaptcha code is trying to use the method getContext. Object doesn't support property or method 'getContext' 回答1: The code I ended up using to support IE8 was the following. <!--[if !IE 8]><!--><script src="https://www.google.com/recaptcha/api.js"></script><!--<![endif]--> <!--[if IE 8]><script src="https://www.google.com/recaptcha/api

PHP Captcha without session

我们两清 提交于 2020-01-11 01:07:50
问题 Ok, here is an issue: in the project i'm working on, we can't rely on server-side sessions for any functionality. The problem is that common captcha solutions from preventing robotic submits require session to store the string to match captcha against. The question is - is there any way to solve the problem without using sessions? What comes to my mind - is serving hidden form field, containing some hash, along with captcha input field, so that server then can match these two values together.