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.
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.
I see two references to font size being set:
$font_size = 5;
and
$font_size = !empty($font_size) ? $font_size : mt_rand(18,25);
Try changing both to be the size you want (I'm assuming a higher number means larger size):
$font_size = 8;
It also looks like the code adjusts the image size to accommodate font size so making the image larger may also affect font-size.
You may want to try to write under that:
$defaults = array('word' => '', 'img_path' => '', 'img_url' => '', 'img_width' => '150', 'img_height' => '30', 'font_size' => '', 'font_path' => '', 'show_grid' => true, 'skew' => true, 'expiration' => 7200);
the following line
$defaults['font_size'] = 0;
(and change the 0
to your desired size of course)
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.
for ($i = 0; $i < 6; $i++)
{
$str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
}