开源免费的验证码解决方案 openCaptcha和reCaptcha

网友投稿 994 2022-08-30

开源免费的验证码解决方案 openCaptcha和reCaptcha

开源免费的验证码解决方案 openCaptcha和reCaptcha

​​Install​​​ |  ​​Common Apps​​​ |  ​​Help Out​​​ |  ​​Contact​​

Captchas remain the most effective, universal method of preventing automated spam currently available on the web. While services like  ​​akismet​​​and  ​​linksleeve​​ provide valuable protection, they are dependent upon widespread adoption to be successful.  When used correctly, captchas just work.

The Problems With Current Captcha Integration

Captchas require special system configurations / modules (like PHP's GD) that, in most cases, cannot be installed without root access.Even with the proper system configuration, programming image creation scripts can be difficult and time consuming.Captchas must be changed with some frequency to prevent cracking.

How Does OpenCaptcha Solve These Issues

It requires no special configurations or modules, it is a simple web service.Basic installation is cut-and-paste, and requires no ability to program image manipuation scriptsNew fonts, image algorithms, and distortions applied weekly.

How To Install OpenCaptcha Installation happens to be quite easy with OpenCaptcha, there are really only 3 steps.

On the form page, dynamically create a filename (and print to the screen both an >img< and an >input value={image name}< tag including that nameTips

Use the current timestamp and your domain name as the random number { 200705041231mydomainname.jpgx }Add -{height}-{width} to specify the size { 200705041231mydomainname-80-240.jpgx will make a 80px tall and 240px wide image }

On the form page, add a text field for the user to enter the Captcha codeOn the processing page, check to see if Answer} returns the word "pass" or "fail"

Below is a really simple sample PHP code.

Example PHP Integration

Login Page

alert('You Did Not Fill In The Security Code Correctly');";}$date = date("Ymd");$rand = rand(0,9999999999999);$height = "80";$width = "240";$img = "$date$rand-$height-$width.jpgx";echo "";echo "
";echo "";?>

Processing Page

Thats it. There is no API, no special configurations or modules and, best of all, you get a powerful, free, highly randomized captcha.

====================================================================================================

reCAPTCHA计划是由卡内基梅隆大学所发展的系统,主要目的是利用CAPTCHA技术来帮助典籍数位化的进行,这个计划将由书本扫描下来无法准确的被光学文字辨识技术识别的文字显示在CAPTCHA问题中,让人类在回答CAPTCHA问题时用人脑加以识别。reCAPTCHA正数位化纽约时报的扫描存档,目前已经完成20年份的资料,并希望在2010年完成110年份的资料。

为了验证人类所输入的文字是正确的,而不是随意输入,有两个字会被显示出来;一个是光学文字辨识软体无法辨别的字,另一个是一个已经知道正确答案的 字。如果使用者正确的回答出已知正确答案的字,那么就假设所输入的另一个光学辨识软体无法辨识的字是认真的检视后被输入而非随便输入

reCAPTCHA 问题的所需的文字图片,首先会由 reCAPTCHA 计划网站利用 Javascript API 取得, 在终端使用者回答问题后,伺服器再连回 reCAPTCHA 计划的主机验证使用者的输入是否正确。 reCAPTCHA 计划提供了许多程式语言的函式库,让整合 reCAPTCHA 服务到现有程式的过程可以轻松些。除非有较大的频宽需求,否则 reCAPTCHA 原则上是一个免费的服务。

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:基于Go的马蜂窝旅游网分布式IM系统技术实践
下一篇:Mysql性能优化:为什么要用覆盖索引?(mysql索引优化是什么意思)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~