Using SecurImage v0.3
Implementing this addition revolved around creating two extra variables that PFM could use, "captcha_type" and "captcha_text", while still retaining the functionality of the classic script in a backwardly compatible way.
This modification was made using SecurImage V0.3 (archive version here ), and will NOT work with more recent releases of SecurImage.
The directory tree I have is something like this:
/securimage_data
/www/pfm
/www/securimage
N.B. Web pages are served from the directories below '/www' , so that '/securimage_data' is outside the scope of the webserver, providing a higher level of security.
In the file '/www/securimage/securimage.php' I have set a full path specification for the data directory, as I found using a relative path meant that the data files weren't found by the check function of SecurImage that I used in PFM.
e.g.
var $data_directory = "/securimage_data";
//path of directory to store code data in. make sure this is either outside of the webroot or unreadable
I made changes to PFM v1.07.2, as shown by this diff output:
You can download the above difference file here
If you don't have the tools or expertise to apply the diff then you can download the modified PHPFormMail here
Finally to use the CAPTCHA in a form and pass the input through to PFM I have used HTML similar to:-
<p><img src="http://my.domain.tld/securimage/securimage_show.php" /></p>
<p>Please enter the code above</p>
<p><input name="captcha_text" value size="10"></p>
<input type="hidden" name="captcha_type" value="securimage">
</blockquote>
The 'captcha_type' input variable MUST be set to 'securimage' if you are using SecurImage version 0.3!
I hope the instructions and resources above help you all to reduce the influx of spam through your feedback form(s).