A number of sites I’ve worked on have dynamic Userbars available for elements around the site. These are really useful for creating dynamic counters/countdowns etc.
To make it easier for myself so I could very quickly make more Userbars wherever I wanted, I built a PHP class that creates a GD image object containing a custom Userbar. With that object, you can save it to an image, output it to screen, store it in memory, store it in a database or whatever you need.
Here is an example that the given library produces by default (note, this example is saved and not dynamic itself):
![]()
Features
- Customisable:
- Text
- Background gradient colours
- Icon
- Reasonably efficient
- Returned as a GD object, so you can do what you wish with the result
- Includes font for creating the famous block text-effect
Usage
To use this library, first download the files required:
Download the Dynamic Userbar PHP Library files here
Look at the test.php file for full use.
include(“userbars.php”);
$generator = new UserBars();
$image = $generator->create(“Test bar! :: “.date(“r”));
Tips
- Check out theĀ infamousĀ Silk Icon Set for some fantastic icons
- Display simple event countdowns for websites that span multiple timezones

Pingback: Userbar als Forensignatur » Matthis kleine Welt