Hope you enjoy reading this.

Customizable Twitter Badge in PHP5

What’s Twitter? A global community of friends and strangers answering one simple question: What are you doing? Answer on your phone, IM, or right here on the web!

I wrote a script that uses the Twitter API to build a customizable twitter status badge. I’m pretty much a novice PHP programmer and this is the first piece of code I’m releasing. It should work fine on any PHP5 server. The script uses cURL to authenticate and grab the XML file from Twitter and then the XML is parsed using PHP5’s SimpleXML.

Enjoy Rik!

Requirements:

PHP5 (*** Will Not Work in PHP4 ***)
Twitter Account

Directions:

Edit the badge_config.php file, supply your twitter username, twitter password, and how many status items you would like to show up. I think the Twitter API only allows a maximum of 20 items, but I could be wrong. Upload all files to your server running PHP5, then in a web browser goto your_folder_name/badge_template.php. If it showed up your good to go.

Demo:

↓  My Twitter Badge

Download:

↓  twitterbadge.zip

Tags: ,

Share your thoughts.