验证码图像与数据库 [英] Captcha Image with database

查看:94
本文介绍了验证码图像与数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!
我已经在 CAPTCHA图片上运行了代码.
我只想知道如何制作相同的验证码,但用数据库中的我自己的单词替换随机数.我真的希望有人能提前帮助我.thnx..

hi!!
i''ve run the coding on CAPTCHA Image.
i just want to know how to make the same captcha but replace the random number with my own words from database.i really hope someone can help me.thnx in advance..

推荐答案

不要在问题与答案"下发布此内容-如果您从某篇文章中获得了代码,则该文章底部将出现一个新消息"按钮,这将导致向作者发送电子邮件.然后会通知他们您希望与他们交谈.
将其发布到此处依赖于他们的下落",并意识到它们是针对他们的.
Don''t post this under Questions & Answers - if you got the code from an article, then there is a "new message" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.


最好的方法是在每次需要图像时都重新创建图像.这样,它变得更加随机.您已经找到此CodeProject文章,建议您使用其中包含的代码.

CAPTCHA图片 [
The BEST way is to recreate the image every time it''s needed. This way, it becomes much more random. You''ve already found this CodeProject article, and I suggest you use the code contained therein.

CAPTCHA Image[^]


替换
this.Session["CaptchaImageText"] = GenerateRandomCode();


this.Session["CaptchaImageText"] = GenerateCodeFromDataBase();



然后在您的 GenerateCodeFromDataBase()方法内部编写代码,该代码将从所需的表中检索数据.

希望以上信息对您有所帮助.如果您还有其他顾虑,请告诉我.



And Inside your GenerateCodeFromDataBase() method write code that will retrieve data from your desired table.

I hope the above information will be helpful. If you have more concerns, please let me know.


这篇关于验证码图像与数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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