Nov
29

Anatomy of a Twitter Replacement

Twitter seems to be all-the-rage in the tech circles these days. When I was trying to find an easy way for Monica and me to update Katie Lynn’s website, I decided to give Twitter a try. It worked well usually, but I noticed the external javascript calls slowed down page load time dramatically. Additionally, customization ability is lacking. I loved being able to send a text message to update the site, but I wanted the ability to email updates as well.

So I set out to find a replacement. I thought that would be simple.

Boy was I wrong.

I searched for a long time and finally found some very basic framework. Luckily, I’m not too shabby with PHP and was able to write everything I wanted:

  • Accept text messages, emails, and web submissions.
  • Parse the text message/email into variables.
  • Insert the variables into a MySQL database.
  • Display records any way I want.
  • Allow people to subscribe to receive an email upon a new update.
  • Load fast!

I then wrote an extremely easy admin interface to be able to edit the entries.

There are five main files to the application:

  • Parser – as the name indicates, it parses the text and email submissions.
  • Admin – all admin functions including posting via web.
  • Notifier – emails subscribers upon all new updates.
  • Subscribe – as indicated, performs the subscription action as requested by the visitor.
  • Unsubscribe – as indicated, unsubscribes a subscriber upon their request.

The beauty of my system is that it does not need a cronjob. Instead, I simply piped an email address to the parser script’s full path.

And voilĂ !

I have a nice, simple Twitter replacement.

Leave a comment

About

This is Tom Sepper's personal homepage. Sit back, relax, ensure seat backs and tray tables are in their upright and locked positions, and enjoy the ride.

Tweets

Social Networking