A small fun project that generates an image from an email string passed via URL parameters. Useful for if you want to hide your mail from scrapers to prevent receiving spam mail by implementing the generated image through an <img src="image.jpg"> tag.
index.html- Simple HTML page with an input field and button to enter an email address. When submitted, it opens a new tab displaying a JPEG image with the entered text as text.MailToJPEG.php- PHP script that creates a JPEG image with the email text using PHP's GD library.
- PHP with GD extension enabled
- A local PHP development server (e.g. PHP built-in server)
-
Start the PHP server in the project directory:
php -S localhost:8000
-
Open localhost:8000 in your browser
-
Input a string into the input field and click on "Submit", the output opens itself in a new tab
