Archive for July, 2005

London terror arrests and the media

Friday, July 29th, 2005

The 24 hours news channels are having a field day reporting the terrorist crack downs happening over Britain (to note Fox news offers possibly the funniest). However one of the strangest things is the amount of eye witnesses reporting they heard gun shots even though the police state there was none. Its not that we live in a country where we here gun shots every day, how on earth do they know what one sounds like?

I know we have movies and TV shows, but I don’t think you get a true effect of a gun noise resonating though a neighbourhood. The only idea in real life that I have is through hearing the bangs from the people who shoot ducks near us. But if I heard two bangs, the first a gun and the second a CS gas canister, I don’t think I would know the difference.

More mobile flickr fun

Wednesday, July 27th, 2005

Ok I have the mobile to flickr thing almost sorted, email me if you want to be a tester by the way, O2 UK only (andy DOT shearer AT gmail.com). I will leave that to run for a few weeks before I set up an automated service where people can sign up for it.

A guy on b3ta asked me why did I do this considering flickr has a great mobile upload facility on its mobile site? Well to be honest I should have searched for this sooner, flickr’s mobile site is pretty good. If I hadn’t already made my little work around I would have no doubt used this, but having said that I would point out the clicking of ‘send’ on a picture then selecting the email address is much simpler and quicker than playing around with WAP. Plus later on I might add to it so you can send the photo to multiple address, not just to flickr.

I fixed O2’s photo messaging to email service

Tuesday, July 26th, 2005

47Leading on from this post, I have implemented a way of sending an email from my phone to Flickr containing a full sized image. With thanks to James at Purple Cloud (my host) who installed a newer version of wget for me, everything is now working a-ok. I can now send an email to a pop3 account (based here at mrblack.co.uk) and every minute that account is checked, if everything is fine the email is read, photo extracted, and sent on to flickr as a proper email with a full sized photo attached. Yay!

I am currently thinking about making this available for everybody on O2 who wants to send full sized photos emails from their phone to people or to flickr directly rather than sending them an O2 advert. I might also see if I can set this up for any other carriers who fail to offer full sized email photo attachments. As for the code, I will make it available when I have fully tested the system, and cleaned up all the filthy comments.

My flickr stream

Russia’s Biggest Spammer Brutally Murdered in Apartment

Monday, July 25th, 2005

Vardan Kushnir, notorious for sending spam to each and every citizen of Russia who appeared to have an e-mail, was found dead in his Moscow apartment on Sunday, Interfax reported Monday. He died after suffering repeated blows to the head.
Nobody in the entire population is being ruled out as a suspect.

read more | digg story

O2, Email and Flickr (Or how I learned not to worry about big companies and devise my own workarounds)*

Sunday, July 24th, 2005

Ok let me start of with a little story. Once upon a time Andy brought a really nice phone, it had a great little camera and was capable of sending MMS, SMS and even emails. Andy was really happy with his phone, he even went to go see Green Day, took some photos and then posted them straight to flickr via email! Andy was the talk of the town, he was super cool, totally fab and now with his new toy, a touch bit sexier.

But then out of the blue 02 changed something which made Andy a very unhappy bunny. 02 in their wisdom had decided to change the way photos were sent by email from a phone. Now instead of attaching the photo file (a happy little .Jpeg) to a fairly blank email, they in its place sent an email in HTML format with no attachments.

Why was (is) Andy so upset with this? Well doing this upset(s) Andy for a few reasons

  • These emails now refuses to work with flickr, as there is no photo attached to the email
  • The email that recipients do receive are covered in O2 branding.
  • The email has some frankly horrible HTML in it. Just look at this photo!
  • The photo messages themselves are now stored online at O2’s site, which technically the whole world can see, In fact go here and see. Imagine if this happened to voice mail messages, where if somebody spent a little time could guess the URL?
  • Andy wasn’t told about the changes.
  • Andy thought that it must be breaking trade practices, as you technically aren’t sending a photo by email. The photo which appears in the email is just the browser going over to O2’s site and getting the image. An annoying difference.
  • When Andy found out about this he was very upset. He cried for a little bit, found somebody to hug, cried a little more but then he decided to write an email to the nasty O2 people that had brought him so much anguish. The email Andy sent basically stated the problems above, pushing the issues of possible breaches in privacy and the fact that he is not actually sending a photo by email. This was Friday, Andy wasn’t expecting anything to be done till next week sometime, so you would think he would have to wait to see the result. Oh, then you don’t know Andy. With a pack of Jaffa cakes, beer, tea and Diet Pepsi, Andy took on 02’s crappy new email in an attempt to make a work around.

    Ok, I am going to change and start speaking in the first person to explain what is going on. I am attempting on my webserver to set up an email account which effectively receives this new shitty O2 email, strips it down, rips out the information, finds and downloads the full sized image from 02’s site and then email it on to flickr. No small feat. I have however found out how O2’s end work, and if you interested in code and how this works, please read on, if not, I would run away.

    First thing I needed was to connect to an email account via pop3 which I would send the email to from my swanky phone. I am going to skip on how to get a script to connect to a pop3 server, and then go through a new email line by line. Although this is complicated, there are some fine examples around. For what it’s worth I just grabbed my trusty wordpress installation and read through the code of wp-mail.php. I then took out all the bits I didn’t need and was left with a script which looks at a pop3 account for a message, if it finds one, it runs through it line by line to make it ready for a post or with a little alteration in our case, an email.

    After that we need to get the URL of the full sized photo stored at O2’s crappy site. To get this URL from the new O2’s photo email there are 2 values that you need to extract from the email message source. These two values are the mmsId and encmmsId. The emcmmsId can be found in the URL labelled “View Message� if you so happen to view the vile email. Here are some fun facts about it

  • It can be found within the email source and is 16 digits long (not sure if this will change).
  • It is in here
    http://139.2.165.14/mms2legacy/showMessage2.do?encMmsId=89D9CC251797CD47
  • It should be easy to find with scripty languages. In this case we want encMmsId to be “89D9CC251797CD47â€?.
  • Ok that’s the first part. Now we need the mmsId. This took me ages to find, but the mmsId is the file name of the image displayed in the email, but without the .jpg extension. Again here are some facts.

  • It can be found in a line which looks like this src=”http://139.2.165.14/MacsService/Macs/ContentService/part/2/email/3874250.jpg”
  • In this case the mmsId is “3874250â€?.
  • Now with these 2 numbers you can grab the actual full sized photo. O2 store these images in some crazy database, so you can’t get a direct link to it like http://www.o2.com/myacephoto.jpg. Oh no, to get the full sized image of our particular example we would use a URL like this

    http://139.2.165.14/mms2legacy/downloadMedia2.d……..

    As you might have spotted we have both Id numbers in there, encMmsId and mmsId. In front of those is what I think is a static IP and script which accept these two variables and another called selectedItem. selectedItem refers to the webpage that we were supposed to visit to get the full sized image, it simply refers to which image is selected to download. So if the message sent from our phone contained more than one picture, this would increment by one, I would presume (not tested).

    Now that is ace, but how on earth do I get a script to automate downloading this image. Well on a Linux/unix/*nix based box you should have wget installed. If you do and its up to date you can run this command. (slightly phpified)

    wget -O /path/to/your/photo/cache/' . $encMmsId . '.jpg --post-data=encMmsId=' . $encMmsId . '&mmsId=' . $mmsId . '&selectedItem=1 http://139.2.165.14/mms2legacy/downloadMedia2.do?

    In php you would wrap all of this within the system() command. If you put this in a loop where it checks through each email, you should be able to collect a nice cache of images which you could then email on using commands such as php’s mail() method.

    Unfortunately, this is where I stop as I have asked my webhosts to upgrade wget to something which can handle the –post-data flag. However, it should give anybody a head start into this sort of thing. For people using Orange phones, I think you have the same problem but I have yet to investigate it. As for other networks I might get round to you :)

    Anyhow, as for now I hope this is of use to somebody. I would actually love it if flickr themselves put it inside their system if O2 don’t see sense and revert back to emailing people their photos. I shouldn’t have to do this, O2 should see google, amazon, flickr and the BBC opening up their API’s to random people, not for short term profit but to encourage people to play around with new technology. I fear O2 have done this to make people think twice about emailing photos, in an effort to push people into MMSing to other phones, something which costs the earth in the UK at least.

    *the title might be a slight take on a film

    I had a dream

    Sunday, July 17th, 2005

    My dream last night had Ross from TV show ‘Friends’ in it (also known as David Schwimmer). His cameo role was that of a 14 year old school boy who tried to steal my books, once I told him not to he proceeded to cut up parts of a magazine which would later be glued to card to make a collage.

    So don’t worry that Friends is no more. Looks like the crew are taking on pointless roles either in my head or elsewhere. I just hope that the casting people in my head didn’t pay over the odds for his lacklustre performance of schoolboy#3.

    Today’s doings

    Wednesday, July 13th, 2005

    Procrastinating is an art form. So today I felt the need to drive into town to buy yet more music. I brought an album by Brakes called “Give Blood�. I will leave you to find out about it, but it’s a little mad, punky country sort of crazy mix and recorded onto tape. I could have downloaded it from iTunes for significantly less, but as I have mentioned before, I am not going to do that until they raise the quality and remove the silly DRM.

    I also spotted Donnie Darko on DVD for the bargain price of £2.99 in Woolworths. That should do well for replacing my slightly dodgy/downloaded copy.

    Update: bah the DVD is wrecked, I’ll get another one tomorrow though.
    Update 2: *crying clutching second DVD* but but… not again.

    How to clean an iPod

    Tuesday, July 12th, 2005

    Basso and iPodMy beautiful iPod has some scratches. She was hurt in timeframe before I brought a iSkin, a few month or so of wear. So I was reading around on how to clean her, some guy used a Dremel, however the kids over at Digg seem to point to the wonderful brass cleaner BRASSO! (you have to shout the name, it sounds like a superhero). It really does work, a bit of elbow grease and a duster to wipe away the Brasso substance and she is now very shinny. The scratches although are still present don’t look as bad. It worked on both sides, although I would watch out around the click wheel, dock connector and headphone sockets, you don’t want the Brasso fibres or wetness messing around with the insides.