Getting the Text Message to Blog Working
February 03, 2010 Filed in: Web Technology
(This is a repost from my Prescott High School Wind Ensemble residency blog)
I visited the PHS Wind Ensemble on Monday to introduce the residency. Cool bunch! I’m looking forward to this. Last few days have been spent getting the technology working for this residency. On February 27, each of the students in the PHSWE are asked to document what they do during the whole day by texting or emailing the blog http://1dayphsband.wordpress.com/. Then, on March 1, the residency begins, and I work with the band to craft a new piece for them, based upon the events of the day that they documented.
Getting the technology to work took some time. The trick is – how do I get a phone number to which folks can text that will automatically go to the blog? It turns out that there are some services which will email you your texts.
And since there are blogs to which you can email your entries, I ended up doing this:
I use a service called 3Jam to buy a cell phone number for only 1 month ($9!) to which anybody can text, and it will forward it to an email account.
3Jam puts in all sorts of extra advertisements into their emails, so I wrote a PHP script (based on this article) to strip out these advertisements and pop the sender’s phone number into the subject line. The PHP script then re-mails the message contents to the blog, hosted by wordpress.com.
Kind of cool, I think.
(Addendum: The code I used for getting this to work is posted here.)
I visited the PHS Wind Ensemble on Monday to introduce the residency. Cool bunch! I’m looking forward to this. Last few days have been spent getting the technology working for this residency. On February 27, each of the students in the PHSWE are asked to document what they do during the whole day by texting or emailing the blog http://1dayphsband.wordpress.com/. Then, on March 1, the residency begins, and I work with the band to craft a new piece for them, based upon the events of the day that they documented.
Getting the technology to work took some time. The trick is – how do I get a phone number to which folks can text that will automatically go to the blog? It turns out that there are some services which will email you your texts.
And since there are blogs to which you can email your entries, I ended up doing this:
cell phone text -> email -> PHP script -> email -> blog
I use a service called 3Jam to buy a cell phone number for only 1 month ($9!) to which anybody can text, and it will forward it to an email account.
3Jam puts in all sorts of extra advertisements into their emails, so I wrote a PHP script (based on this article) to strip out these advertisements and pop the sender’s phone number into the subject line. The PHP script then re-mails the message contents to the blog, hosted by wordpress.com.
Kind of cool, I think.
(Addendum: The code I used for getting this to work is posted here.)