Sat 18 Apr 2009
lifeblog – WordPress Posting From Your Nokia Device
Posted by jjaimon under Technical
[4] Comments
I used to post from my N70 using lifeblog earlier. I have been looking for a similar feature after I upgraded to N96. While N70 used to have a simple lifeblog interface, N96 changed that to more feature rich Share Online. Nokia device is preloaded with Share Online 3.0. Being an adventurous one, and prefer to be on the cutting edge always, I upgraded my device to new Share Online 4.x.
Phoneboy posted the instructions to post to wordpress from lifeblog last year. I have been using this in my N70 and it used to work great. I knew he is smart enough to find a way to post from share online. I was not surprised when I saw this post a few weeks back.
However, it was not that easy since I use N96 and Share Online 4.x. I could add my blog as one of the service in the Share Online configured services in the phone. I couldn’t post as it always failed. I was not ready to gave up. Setup requires two php scripts as described in the phoneboy post. All instructions remain same. I tried to debug this with the help of phoneboy.
Share Online sends two or more xml files depending on your post. This can be tracked by enabling (by default) complete dump of phone upload. The first xml file looked something like this…
2009-04-08T01:17:02Z: method: POST
2009-04-08T01:17:02Z: rawpostdata:
aNosqGXBxTfOqKUYY1HmoSNrk5mpPNqIAmlKEdaLIdx5kNKHPao1U5qxHFmk7IaQICRUypxUkceBUqrxSKsQeXRjFTEcVE3BxQFgBxShvWmAc08CmIkU04NUPSl3UCZ/
/2Q==
2009-04-14T01:09:15Z: action: post
2009-04-14T01:09:15Z: postaction
2009-04-14T01:09:15Z: filetype: .jpg
2009-04-14T01:09:15Z: filename: /lifeblog-10042009010.jpg
2009-04-14T01:09:15Z: id: url:/lifeblog-10042009010.jpg,type:Image,format:Image,summary:
The data is in the base64 encoded content tag. lifeblog.php used to parse the code something like this…
} elseif(preg_match('/
ode="(?P
{
But, Share Online sends title with an attribute, type.
So the regular expression for preg_match need to be changed to <title.*> in all places.
I have been trying with sample icons in the phone since they are very small and easy to upload. Problem started when I started uploading actual photographs. I noticed that preg_match fails when the base64 encoded data is large. (50-70KB approx). I googled and found that this is a known problem with PCRE library that php uses for preg_match. Some references suggested to increase the pcre backtrack_limit as a work around in the php.ini.
[Pcre]
;PCRE library backtracking limit.
pcre.backtrack_limit=5000000
I can post to my wordpress blog now. Here are the modified shareonline.php and lifeblog.php. You will have to change all references to jjaimon.net/blogs in shareonline.php. Follow the instructions given in the phoneboy blog.
4 Responses to “ lifeblog – WordPress Posting From Your Nokia Device ”
Comments:
Leave a Reply
Trackbacks & Pingbacks:
-
Trackback from Stimmen .... Bilder ....
March 4th, 2010 at 2:55 pmMobiles Bloggen 2.0…
Das gute alte Share Online von Nokia hat auf dem N97 mini die neueste Version 4.irgendwas, und damit funktioniert das alte Script nicht mehr. Nach ein wenig Analyse liegt es zunächst an veränderten XML-Headern, die Tags sind erweitert und man muß alle …

November 6th, 2009 at 7:49 am
I use this way also in my blog
.
Thanks lot
April 24th, 2010 at 11:43 pm
Warning: require(wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /home1/jjaimonn/public_html/blogs/wp-content/uploads/lifeblog.php.txt on line 40
Fatal error: require() [function.require]: Failed opening required ‘wp-blog-header.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home1/jjaimonn/public_html/blogs/wp-content/uploads/lifeblog.php.txt on line 40
April 24th, 2010 at 11:43 pm
this is the content of lifeblog.php.txt