Gonna give this tutorial thing a crack ya know
Introduction
What is a Dynamic Signature? A Dynamic Signature is an automatically updating image that will display a group of statistics for individual, or a certain amount of users.
It uses PHP scripts to write over the top of an already existing image with data from a specified database, and then outputs it as a new image.
Example of a grouped user dynamic signature:
Example of an individual user dynamic signature:
What are the benefits of creating a dynamic signature?
Dynamic signatures are a great way to display data, and it also gives users of your script something to show off.
For example, you want to find out how long an individual user has run a certain script for, but all you can see is the time ran in milliseconds, which isn't very readable.
Requirements
- A web server / website
- A MySQL Database
- A brain basic understanding of programming concepts
- The ability to understand what I am trying to demonstrate, I am by no means a teacher.
The Beef
So lets get started. With my current setup, I am using 2 separate PHP files, one is for updating the database with the new data for each user, and the other is for generating
Creation of the Database
Update.php
Signature.php
Finishing Off
There is only a couple more steps left, and they are generally a lot easier for most people.
Step 1. Submitting data when your script is stopped
Basically, in your onExit(), you want to have this, you will need to replace the URL with your web host URL.
Step 2. Creating a web page for generation
This 2nd last step, and it is important to ensure that the html file you create is in the same folder as your PHP scripts, otherwise you will have to do all that pathing nonsense, which isn't that big of a deal.
Here is my current HTML Code for a simple user interface:
Step 3. Modifying your .htaccess to rewrite .php urls to .png so that you can display your signature on the forum.
On your webserver, there should be a file called ".htaccess"
Modify this, and place the following inside
RewriteEngine On
RewriteBase /
RewriteRule signature.png signature.php
You should now be able to generate Dynamic signatures like so:
If you find any problems, please don't hesitate to point them out, or to ask for help.