Ming the Mechanic:
Moblog

The NewsLog of Flemming Funch
 Moblog2004-02-28 17:10
2 comments
by Flemming Funch

Alright, so having a mobile phone with a camera I of course need to have a moblog. "Moblog" is an even worse word than "Blog", but that's somehow what it got to be called. It is essentially that you can make a posting on your blog while on the go, from a phone or PDA. Typically it is done by having the latest picture in a sidebar, which then links to the gallery of past pictures. So it becomes sort of a different track, with smaller snapshots of things one is doing, without having to be able to say something clever about it.

I had in mind programming it myself, so that it could be integrated with my NewsLog blogging program. So, the first thing needed was a gallery. And there's of course no reason one should only be able to post to it with a phone, so I made it so one can upload from a normal file too, or grab a picture from a URL. And so one can edit the titles, delete mistaken pictures and stuff like that.

OK, then the aspect of how we get from my phone to a file on the server, if I go that way. I could make my own approach, but I glanced at other people's suggestions to see what might be the best practices. Like this how-to guide by David Davies.

So, I set up a separate e-mail account for the purpose. No problem to send a picture from the phone to an e-mail address. Then I'll put a password in the subject line, which will ensure that no random spam gets posted. And I'll put some descriptive text in the message itself.

Now, picking up e-mail from a pop account, and finding an attached picture, is not quite as trivial a programming task as it might look like. It is no wonder that most e-mail programs do something different and often screw up each other's messages. The standards are rather complicated, and everybody doesn't keep them. So this part took the longest time. I used PHP's built-in IMAP functions, which is based on a common IMAP library. Which exposes a lot of the dirty detail, rather than just doing the job for me, like handing me the attachment no matter where it was hiding. For starters, I made it so that it at least picks up the text and attachments the way my phone sends it. Which happened to be two different ways depending on whether it was a photo or a drawing. Next I'll try sending pictures from my normal e-mail programs and debug what goes wrong with that. Anyway, I made the program pick up mail once per hour, as the mail pickup is rather slow, and I don't want to overload anything if there ends up being many of these accounts.

You can see the current result in my right sidebar. Just a few pictures so far, but you get the point.

And for you other guys who use my NewsLog program, I need to work out a few more details, then this functionality will be available for you too. I.e. you can have a picture gallery, and optionally post to it via e-mail. Only hurdle for that part might be to acquire an extra e-mail account for the purpose.


[< Back] [Ming the Mechanic]

Category:  

2 comments

28 Feb 2004 @ 17:31 by bushman : :}
Can't wait, lol, :}  


29 Apr 2016 @ 05:16 by Bertie @188.143.232.32 : NRjMinJHCDP
I hate my life but at least this makes it beraable.  


Other stories in
2012-05-03 00:04: An evolving path
2012-01-02 13:52: 2011 Accomplishments and 2012 Aims
2011-11-17 02:20: Your inner piece
2011-02-01 00:05: Slow Mo Flow
2011-01-22 18:40: Recognition
2010-08-23 00:36: Where's Ming?
2010-07-20 14:24: Getting other people to do stuff
2010-06-22 00:27: Inventory
2010-06-19 23:10: Conversations
2009-10-28 12:31: Then a miracle occurs



[< Back] [Ming the Mechanic] [PermaLink]? 


Link to this article as: http://ming.tv/flemming2.php/__show_article/_a000010-001133.htm
Main Page: ming.tv