I can't answer your post but read this may be it can help:
PHP is a scripting language that is suited for web dev and can be embeded in HTML
If your server support php , you will just need to create .php and the serve will parse
You want to save bandwidth so install apache, php , mysql.
If you have diff installing php , you can download a preconfigured php package.
Here 's how to install:
You can use php for : 1. server side scripting 2. command line scripting 3. client side gui application
You must connect PHP to the server, server php has a direct module interface (sAPI) you can also setup cgi executabe to your server.
Add to /etc/apt/sources.lists :
deb
http://packages.dotdeb.org stable all
deb-src
http://packages.dotdeb.org stable all
than:
apt-get install libapache-mod-php4
/erc/init.d/apache stop
/etc/int.d/apache start