Can you define "can't seem to get it to work"? I just ran the code on my server and it generated the image just fine. Note that if you have any output other than the image it won't work correctly.
To display images generated by this script you'll either need to store them somewhere, or have them generated on the fly in a separate script. Like this for example:
HTML Code:
<img src="/path/to/generator.php?email=test@test.com" />
generator.php
PHP Code:
$string = $_GET['email'];
// .
// .
// .
Of course passing the email as a GET parameter to the script kind of defeats the purpose since bots will be able to read it.
Last edited by NullPointer; 03-20-2011 at 01:41 PM..
|