Thu, 14 Dec 06

Addicted to

But not because of a craving to be loved. Honest. For a long time I’ve wanted to be able to interact with a computer/remote process via sms. Just this morning I was struck with what I thought was an amazing idea. I’d heard of twitter and wondered if I might be able to use it as a type of sms gateway. Turns out that I could. Yay.

To play along, you will need:

require 'rubygems'
require 'json'


text = JSON.parse(js).first['text']


`curl -u"#{SENDER_USERNAME}:#{SENDER_PASSWORD}" -d"status=#{text.reverse}"`

The script just reads the most recent message sent to your mobile twitter account, reverses the text and sends it back to your mobile.

This is all free stuff, and although the twitter terms of service don’t appear to explicitly disallow us doing this, I think you should probably be nice if you’re going to use it in this way.