What is a dynamic Counter Favicon you will ask? No, you already know! We all have already seen the small icon in the Browser Tab called Favicon. But if you want to read more about this tiny little thing, take a look at the Favicon-Cheat-Sheet on GitHub Page from Audrey Roy Greenfeld. But today i want to direct your attention to an other topic. Dynamic content in such an favicon. This can be used for a counter of unread e-mails or a number of search hits you get from a search-engine. Oh, that is our subject…
I present you a little PHP script that generate a dynamic favicon for e.g. a message count or whatever, direct in your browser tab icon. If your browser has lots of tabs open, this might be a really useful feature that let user know of any important count item. This small but powerful script in PHP let you create your own dynamic Favicon. It will use the PHP GD library to manipulate the favicon image and add text (maximum two digits) into it. If you try to give a longer Text to the Script it will show three dots in the icon (…) – thats all 😉
Take a look at the “PHP dynamic Counter Favicon” on my GitHub, it also comes with three example PNG Frames and a Test-Script that show how it works.
Please give it a try and i will be happy if you comment in what environment you use it.