wheelybird.com

Wheelybird

Freelancing

Code

Code
RemarkableCMS
Avatar
Backup

Funs

Links


Avatar

Do you want to make things say things? It's surely a primal urge, and amazingly now you can. Sort of. Look:



These delightful creatures can be controlled by you. As long as you have a web server that supports PHP with the GD & TrueType libraries installed, you can call this script in <> tags, like:
<img src='www.yourdomain.com/scripts/avatar.php?text=The thing that you want to say">

or with a bit of mod_url language, like this:
<img src="www.yourdomain.com/The thing that you want to say/avatar.gif">.
The script will generate a dynamically generated, transparent GIF image using the image of your choice to do the speaking, and the speaking thing can be on either the left or right. You can also define which TTF to use.

The mod_url magic to use in your .htaccess file is:

RewriteEngine on
RewriteBase /
RewriteRule ^(.*)/avatar.gif$ /scripts/avatar.php?text=$1 [L]

Naturally you can change the name of avatar.gif to whatever you want to call your image, and change the location of the script.


You can download the script here: avatar.txt (php script).

Use this script at your own risk, as it is not fully tested. It may have bugs or security issues. I take no responsibility for badnesses.

All images and content ©2008 wheelybird.com & not to be reproduced or used without permission.