<?php
header('Content-type: image/png');
$email = filter_input(INPUT_GET, 'email', FILTER_SANITIZE_EMAIL);
if (empty($email) OR !filter_var($email, FILTER_VALIDATE_EMAIL))
{
$email = 'Invalid email.';
}
$im = imagecreate(strlen($email) * imagefontwidth(3), 15);
$background_color = imagecolorallocate($im, 255, 255, 255);
$txt_color = imagecolorallocate($im, 0, 0, 0);
imagestring($im, 3, 0, 2, $email, $txt_color);
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
imagepng($im);
imagedestroy($im);
?>