views:

40

answers:

3

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.

A: 

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.

John Conde
Thanks for the reply, but none of them worked. I did not give the down vote though.
shin
It was worth a try. :)
John Conde
A: 

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)

neo
A: 

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);
    }
Rook
You got it wrong, it's not on that line.
Alix Axel
Any reason why all other answer are downvoted? At least I can say that this isn't an answer to that question: The *font size* should be changed not the *length* of the captcha!
neo
It is the line for the number of letters.
shin
Thank you shin, can I get the check mark?
Rook
shin was talking about that this is not the correct answer to the question, just read carefully...
neo
The correct answer is to delete this extremely insecure capthca from every drive on the planet.
Rook
Yes, neo is right. It is not what I am asking for. But thanks.
shin