|
How to make a dynamic forum signature
Make people wonder... By Red Squirrel
Ever thought it would be cool to have a forum signature that changes every time? But figured it would be a pain to somehow have an automated process upload a new one ever N minutes? Well it's very simple, and does not require anything but a bit of php code, so you do need a php enabled host. You don't even need lot of bandwidth either! This short guide will show you how you can make your own rotational signature for use in forums, emails and other places!
Setting up the folder
First, you need to setup a folder where the main image is. The main image is the image you will link to, this is actually not an image but php code which we will look at soon. You need to be running a server that uses apache and php, and type the following in your .htaccess file:
ForceType application/x-httpd-php
You should also create a file called "number.txt" which is used in the code to randomize the image.
This will force all files to run as php. There's other ways of doing it so it only affects specific files, but this is the simplest one and works well since you can use a gif file or whatever, heck, you can even start your own service and put everyone's sig in that folder! If you want to specify specific files to run as php, you can lookup apache's documentation for other ways to do this, but in this case we'll simply make a folder that parses everything as php.
Notice: Do not store any other files in this folder, this folder should only be for the "fake" image and number.txt.
Next Page
| 30327 Hits |
Pages: [1] [2] |
145 Comments |
|
Latest comments (newest first) |
Posted by Guest on March 03th 2006 (07:06)
I must confuses your site is really cool!!! Great site, great idea, just all round great work, everyone.

|
Posted by Guest on February 02th 2006 (05:09)
Hi Good site. It would be desirable to return again and again!

|
Posted by PCheese on July 07st 2005 (20:10)
Nice tutorial!
For those of you looking for a more complete solution, ampsig is a great free dynamic PHP signature script.

|
Posted by unacceptable on May 05th 2005 (14:09)
nice tut dude just got something to add
AddType application/x-httpd-php .png
in your .htaccess is a good idea instead of the forcing the php
and add this inot you apachy conf file...
<Directory "c:\pat\to\sig\root"> AllowOverride FileInfo </Directory>
using this method is better because correct information is shown when the user right clicks and saves or checks teh properties in IE, and is generally more compatable.
Cheers dude, iv got a kick butt sig thanks to this, pulling data from 4 different source (php, html and xml x2) and a set of random quotes. Its so easy to expand this code to make something pretty cool.
Once again thanks

|
Posted by ZenithalRavage on May 05th 2005 (13:11)
phew, Imagettftext works now! I got a reply from my webhost and all I had to do was put ./ infront of the fontname, so instead of:
$font = "arial.ttf";
this:
$font = "./arial.ttf";
sheesh
So if someone has similar problems and the host does not allow the GDFONTPATH command, this could be your solution

| View all comments Post comment |
|
|