无法更改 PHP 中验证码的大小
I have the following captcha plug-in.
I tried changing different font-size but none of them worked.
Could anyone tell me how to change the font-size please.
Thanks in advance.
EDITED: Code Here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这个验证码是垃圾,而且这段代码写得不好。你应该使用 reCapthca,它非常好而且免费。
我有权说这个 capthca 是垃圾,因为我破坏了 capthcas:
http://web.nvd.nist.gov/查看/漏洞/详细信息?vulnId=CVE-2008-2019
http://web.nvd.nist.gov/查看/漏洞/详细信息?vulnId=CVE-2008-3573
http://web.nvd.nist.gov/查看/漏洞/详细信息?vulnId=CVE-2008-2020
http://web.nvd.nist.gov/查看/漏洞/详细信息?vulnId=CVE-2008-3573
(或者至少在 2008 年我做到了:)
但要真正回答你的问题:在第 127 行,正在生成挑战的长度。将数字 6 更改为您想要的任何数字。
This captcha is garbage and this code is poorly written. You should use reCapthca, it is very good and its free.
I have the right to say that that this capthca is garbage because I break capthcas:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-2019
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-3573
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-2020
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-3573
(Or atleast in 2008 I did :)
But to actually answer your question: On line 127 the length of the challenge is being generated. Change the number 6 to whatever you want.
更改这段代码中的字体大小,并为调用
mt_rand
输入更高的值。另请确保
$img_width
和$img_height
足够大,以便较大的字体适合图像。Change the font size in this piece of code, and enter higher values for the call to
mt_rand
.Also make sure the
$img_width
and the$img_height
are big enough so larger fonts will fit in the image.您可能想尝试在下面编写:
以下行
(当然,请将
0
更改为您想要的大小)You may want to try to write under that:
the following line
(and change the
0
to your desired size of course)