获取动态图像文本 [英] get dynamic image text

查看:121
本文介绍了获取动态图像文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我有一个contactus页面,我在其中使用了代码来保护垃圾邮件.
现在,我生成带有文本的图像,我想检查用户输入的数据是否与图像上的文本相同,但是我不知道如何获取图像上的文本,任何人都可以帮助我,请???


HTML图片:

hi all
i have a contactus page which i used acode for protection of Spam in it.
Now , i generate the image with its text and i want to check for the user entered data is identical with the text on the image , but i don''t know how to get the text on the image , can any one help me , please???


The Html Image:

<img id="CaptchaImage"  alt="Web Form Code" style="margin-left:20px; border:1px solid #999999" src="http://www.SnapHost.com/captcha/WebForm.aspx?id=FTLT7E9R5EUC&ImgType=2" /></a>
<br />
<a href="#"  önclick="return ReloadCaptchaImage('CaptchaImage');"><span style="font-size:12px;">reload image</span></a>



重新加载代码的代码:



The Code Of Reload Image:

<script type="text/javascript">

    function ReloadCaptchaImage(captchaImageId) {
        var obj = document.getElementById(captchaImageId);
        var src = obj.src;      
        var date = new Date();
        var pos = src.indexOf('&rad=');
        if (pos >= 0) { src = src.substr(0, pos); }
        obj.src = src + '&rad=' + date.getTime();
        return false;
      
    }
</script>



感谢



Thanks

推荐答案

检查本文以获得确切答案

CAPTCHA图像 [
check this article for exact answer

CAPTCHA Image[^]


为什么不只使用 ^ ]-它是免费的,易于使用,并且有助于数字化图书.
Why not just use ReCaptcha[^] - its free, easy to use, and it helps to digitize books.


这篇关于获取动态图像文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆