1. Introduction
Sometimes we need to use verification code in the form submission to prevent flooding, bots and other malicious operations, about the verification code has a lot of open source Library to use, the current most used is the Google recaptcha--whether the client or server-side use is very simple and convenient, So here we take Google
CAPTCHA word known to the answer. The software regards users who can correctly recognize CAPTCHA words as humans. When CAPTCHA words are correctly identified, the program records users' answers to unreadable words and adds them to its database. This completes a manual OCR recognition. Process 1.
(Figure 1)
To improve the accuracy of the software, reCAPTCHA sends the most difficult words to multiple users and selects those with the same answer as the
human Turing tests) to identify characters in old books that are difficult to be recognized by OCR, aided by the human brain's ability to discern characters that are difficult to recognize. In other words, recaptcha can not only spam (spam), but also help to digitize the ancient books (can be called artificial OCR). I can only say that the idea is absolutely absolute. So even because reCAPTCHA is Google's
Step 1 Registration
Step 2: Get the api and embed the code into the relevant webpage.
First, enter the code in the template, that is, the report. php template on the form submission page.
Captcha
Next we will post the code to the relevant
First Step Registration
The second step is to embed the code in the relevant web page after getting to the API
First, type the code into the template, which is the form submission page report.php the template
Captcha
The next step is to post
1. Modify the two methods in recaptchalib.php
Copy Code code as follows:
function _recaptcha_http_post ($host, $path, $data, $port = 80) {
$req = _recaptcha_qsencode ($data);
$response = ';
$url = $host. $path;
$post _data = $req;
$ch = Curl_init ();
curl_setopt ($ch, Curlopt_url, $url);
curl_setopt ($ch, Curlopt_returntransfer, 1);
We are in post data Oh!
curl_setopt ($ch, Curlopt_post, 1);
Add a post variable to the
curl_setopt ($ch, Curlopt_postfields, $post _data);
$
1. Modify the two methods in the recaptchalib.php
Copy the Code code as follows:
function _recaptcha_http_post ($host, $path, $data, $port = 80) {$req = _recaptcha_qsencode ($data);$response = ";$url = $host. $path;$post _data = $req;$ch = Curl_init ();curl_setopt ($ch, Curlopt_url, $url);curl_setopt ($ch, Curlopt_returntransfer, 1);We're in post data Oh!curl_setopt ($ch, Curlopt_post, 1);Add the post variable to thecurl_setopt ($ch, Curlopt_postfields, $post _data);$output = curl_exec ($ch);Cu
CAPTCHAs is an annoying technology. According to data statistics, users around the world need to complete 0.1 billion CAPTCHA tests every day. ReCAPTCHA is a project launched by the University of Carnegie Mellon to digitize the old books with the catptcha technology. It is estimated that the technology can complete 160 books a day.
The reCAPTCHA technology, reCAPTCHA
Php space does not support socket but curl recaptcha usage. For more information, see. 1. modify the two methods in recaptchalib. php
The code is as follows:
Function _ recaptcha_http_post ($ host, $ path, $ data, $ port = 80 ){$ Req = _ recaptcha_qsencode ($ data );$ Response = '';$ Url = $ host. $ path;$ Post_data = $ req;$ Ch = curl_init ();Curl_setopt ($ ch, CURLOPT_URL, $ url );Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 );// We are posting d
Php space does not support socket but curl recaptcha usage. For more information, see.
Php space does not support socket but curl recaptcha usage. For more information, see.
1. Modify the two methods in recaptchalib. php
The Code is as follows:
Function _ recaptcha_http_post ($ host, $ path, $ data, $ port = 80 ){
$ Req = _ recaptcha_qsencode ($ data );
$ Response = '';
$ Url = $ host. $ path;
$ Post_d
Php space does not support socket but curl recaptcha usage. For more information, see. 1. modify the two methods in recaptchalib. php
The code is as follows:
Function _ recaptcha_http_post ($ host, $ path, $ data, $ port = 80 ){$ Req = _ recaptcha_qsencode ($ data );$ Response = '';$ Url = $ host. $ path;$ Post_data = $ req;$ Ch = curl_init ();Curl_setopt ($ ch, CURLOPT_URL, $ url );Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 );// We are posting d
Copy CodeThe code is as follows:
From urllib.request import Urlopen
From Urllib.parse import UrlEncode
Import Tornado.httpserver
Import Tornado.ioloop
Import Tornado.web
#获取key: Https://www.google.com/recaptcha/whyrecaptcha
PublicKey = ' Fill in your public key '
Privatekey = ' Fill in your private key '
Class Application (Tornado.web.Application):
def __init__ (self):
handlers = [
(R '/', Indexhandler)
]
Settings = Dict (
Template_path= "Templ
Xeim this is an article published by Google Engineer Amit Singhal on Google's official blog, which describes some of the technologies behind Google's search rankings. It involves Google's understanding of webpages, semantics, and user intentions.
The core technology of Google search ranking is derived from information retrieval (IR), an academic topic that has been 50 years old. IR uses statistical principl
Beijing time September 17 (AP)--Google announced in Wednesday the acquisition of the Carnegie Mellon University incubation website fraud-prevention tool company reCAPTCHA to crack down on spam and fraud in books when digitized, the Associated Press reported. The terms of the agreement were not disclosed.
reCAPTCHA provides a few simple word fans that users must
Google Font [translated from Google official documentation], Google font
This Guide explains how to use Google Font APIs to add network fonts to your own pages. You don't need any encoding. All you have to do is add a specific CSS to the HTML page and associate the font with the CSS style.A quick example:This is an exa
Having said so much, let me first take Google Discovery RESTful services as an example to show you how to call Google Discovery RESTful services with the most common Java code.Introduction:Under "How to integrate with Google APIs and Google Apps (2)", I've listed all of the Google
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.