Live blogging is pretty handy, when attending events, it never hurts to be able live blog about the latest new gadgets.

We’re going to build a simple live blogging app using PHP, Simperium and Twilio.

This particular live blog solution is set up for one event, this means all posts to the phone number we specify will show up.

You could build on this to allow for multiple events, but that’s a little more than we want to dive into today.

And yes, we could also use Pusher for this, but I like Simperium as it serves as both a datastore and a real-time push service, so that way we can store our posts on Simperium, and viewers are updated instantly.

Since these posts are just a line or two or text and a picture.. We don’t need anything too advanced for our data storage…

Since it’s the framework I use for a lot of projects, I once again, built this using the Jolt Micro Framework, which works well for building apps rapidly.

You’ll need a few things things to set this up:

  1. A Twilio account ( )
  2. A account  ( )
  3. You need to create an app ( )
  4. From the app page you need to record: 1. the app-id
  5. the default API key
  6. Go to browse data and click generate token beside your username and generate a token to use for connecting to Simperium.
  7. The Twilio PHP library ( )
  8. The Simperium PHP library ( )
  9. The Jolt framework, as we are going to build this with Jolt. ( )

Let’s get started.

  1. Download the Jolt PHP Framework from here:

  2. Unzip it, open up config.ini , and add the following settings:

  1. Create a folder called Services/

  2. Download the Twilio PHP library here: and save it to the Services/ folder.

  3. Download the Simperium PHP library here: and save it to the Services/ folder.

  4. Open index.php , and copy the following code:

Our main focus is the /listener section of the code, which is what talks to Twilio.When we receive a new message, we check to see if the message had any images or not, and if it did, then we  cycle through each image. We then save the image locally, resize it, and post it to Simperium using the Simperium PHP library. If no image was passed, then we just save the message as it was sent to the system.

The other part of this is how we get a unique id for each post, which is using the generate_uuid() to create a unique UUID compatible string.

  1. Create a file called functions.php , and copy the following code:

The main part of this file is the cropResize function which will take any given image and crop and resize it to fit the dimensions we give it. This is handy when dealing with larger sized images.

  1. Open views/home.php and copy the following code:

This is the brains of our real-time notifications, as we send posts and images to our live blogging app, this is where it will get displayed as soon as the posts are processed.

  1. Upload the files to your web server.

  2. Create a folder called images/ and make it writable, inside this folder, create a folder called original/ and a folder called procesed/, make sure these are writable as well.

  3. Log into your twilio account, and point a phone number to http://MYSITEURL/listener for SMS messages

  4. Open up your web site: http://MYSITEURL/

  5. Send some text or a picture to the phone number and watch it appear on the web site.

We’ve now built a basic live blogging tool, nothing too fancy, but you can take it from here and build on it to make something more fancy.

I’ve also uploaded the demo app to Github, so you can view it in its entirety here:

[Download the zip file](    or    [Fork it](