this scripts creates an images when accessed.
convert-command executed by php:
/usr/bin/convert -antialias -font /usr/share/fonts/truetype/Arial.ttf -pointsize 12 -fill blue -draw "text 10,15 'REMOTE_ADDR: 38.107.179.243'" -pointsize 12 -fill blue -draw "text 10,28 'HTTP_HOST: www.qapla.org'" -pointsize 12 -fill blue -draw "text 10,41 'SERVER_ADDR: 85.214.56.168'" -pointsize 12 -fill blue -draw "text 10,54 'SCRIPT_NAME: /trash/php/index.php'" -pointsize 12 -fill blue -draw "text 10,67 'REQUEST_URI: /trash/php/'" -pointsize 12 -fill blue -draw "text 10,80 'HTTP_USER_AGENT: '" -pointsize 12 -fill blue -draw "text 10,93 'CCBot/1.0 (+http://www.commoncrawl.org/bot.html)'" -pointsize 12 -fill blue -draw "text 10,106 'SCRIPT: index.php'" -pointsize 12 -fill blue -draw "text 10,119 'DATE/TIME: 2012-02-07 01:11:25'" background.jpg text2img.jpg
Generated in 2.470 sec
and the final image:
test.html shows how to use such an php script
(text2img2.php) for an <img>-tag. ugly source
here. raw output here.
may be useful to prevent hotlinking, generate random strings to prevent
robots from using forms or some other things because any kind of
php-code can be inserted.