I was having the fclose errors as well. This fixed it:
Lines 57-60:
Code:
closedir($Handle);
$Handle = fopen('./captcha' . '/' . $FileName, 'w');
fclose($Handle);
The image generated is a little underwhelming. Any ideas how to improve it? Can we pull in X-Carts image verification somehow?
Cheers,