Another thing I did over the weekend was code a bit.
I’ve been working on updating my MobLog script, and it’s really coming along. Already, it works great in allowing me to post short entries (with an included attachment, ie. a photograph) from remote using nothing more than a cell phone. By the time last night came around I trusted it enough to set it up under a cron job, so that I don’t need to run it manually for updates to occur. It functions beautifully.
At this point, I’m mostly just cleaning up the source code, commenting liberally, and trying to make it as simple as possible to configure. In trying to set up a moblog for this site I realized that there are a dearth of easy to set up scripts out there, with most requiring some seriously goofy hackery to get up and running. While traditional weblogging has exploded due to the proliferation of (relatively) easy to use tools, it’s shocking to see that moblogging has remained on the back burner even though everyone and their dog has a photo capable phone these days. I think the lack of usable tools is responsible for a large part of that.
Anyhow, the script is coming along nicely. Once it is finished, I plan on open-sourcing the code so that others may use - and improve upon - it with ease and at no cost. I’m still deciding on what license to go under - either BSD or GPL is likely.
Currently, the script does the following:
- It periodically checks a specified POP3 email account, inserting any email sent there into a database. It then updates a “moblog summary” file, which you can then include in your web site using PHP, server side includes, an existing weblogging tool, etc. You can see an example of this on the top-right corner of this page.
- The database is queryable just like any other. I’ve written a simple PHP script that shows all previously posted moblog entries, though this is pretty primitive at this point. Eventually it will be an archive of sorts, allowing you to view entries by month or other criteria.
- I’ve written some simple Atom v1.0 feed generation code, allowing you to create syndicated feeds for the last 10 (or whatever) entries posted to your moblog. Once I fix a small bug relating to date/time-stamps, I’ll make my own feed available. Some day I might add RSS feed support, but most feed aggregators have already begun supporting the newer Atom standard so it may not really be all that necessary.
Some things that I’d like to either add myself, or convince some gullible shlub remarkable individual to add for me:
- A basic commenting system.
- The ability to post new entries directly to various common weblogging systems - probably using one of the several available APIs out there. I can probably handle Movable Type (and maybe WordPress) support myself, but I don’t really feel like doing it for every single weblogging tool under the sun (yay for open source!).
- RSS support. Probably not too hard, really. Atom support was a piece of cake to add, and RSS would probably be no more difficult.
- Dynamic thumbnail creation for the summary page. Right now it just resizes images in XHTML, which is lame as it saves no bandwidth. I can think of a few ways to do this.
(Note: This has been added! See below.) - More security! Right now, any email sent to the email address in question is posted, causing this system to rely on security through obscurity. That’s not a good thing, but any solution to this must not complicate the posting process.
(Note: This has been added! See below.) - Support for more attachment types. Right now, only .jpg, .gif, and .png images are supported. Mobile phones are becoming more and media rich these days, though, so support for common video and audio formats should be added. Seems pretty easy to add, though.
If you are interested in moblogging in conjunction with your own site or have any ideas of stuff to add, please don’t hesitate to let me know.
Update (11:40 PM): I’ve just added optional thumbnail creation, through the use of Imagemagick. Works pretty well. Thanks go to Dallas B. for suggesting a good way to go about doing this.
Update 2 (12:23 AM - 2005-09-20): Okay, I’ve just added some security improvements to the system. Now, you can specify up to 3 email addresses to accept moblog submissions from - if an email comes in from any other email address, it will be discarded. This isn’t perfect, of course - email ‘From’ headers are trivially forged. In most cases, though, I suspect it’s random spam - not malicious attacks - that will result in moblog defacement.
For those that desire better security, I’ve also made it so that you can specify a password that must be placed in the body of the email submission. If it doesn’t exist, the entry is discarded. This overrides the email address check described above, too, allowing you to post from any email address as long as you come up with your password (yes, before you ask, the password is deleted from the email before it is posted!).
While not perfect, these options should allow users to secure their moblogs reasonably well. I would still recommend using an obscure (and unpublished) email address, though, as an added measure.










Stuff
I will be bringing the webcam back later tonight. I will also see if I can get Jeff to give me a copy of his Mobile Blog Script so I can post pictures from my phone. i am taking at least three a day that I think about posting but it isn’t worth …