Ok, I finally got the captcha working. Wasn't that hard, but it was more the concept that was kind of eluding me... Where to send the data from the image and from the text box, how to compare them and so on.
I like the way my little script works, because if for whatever reason the commenter didn't fil the captcha field properly, they wil be sent an email containing a link allowing them to publish their own comment. I'm wondering if spammers would learn how to make their robots do that... Anyway, doesn't matter because I haven't had a single comment spam since I changed over from wordpress yesterday. Wait and see, I guess.