PHP Nokia LifeBlog / Atom Post example

download (Set of scripts that allows you to post photos from your Nokia 95 to your webserver)

README

#
# PHP Atom Push / Nokia LifeBlog test
#

Included is a quick hack which allows you to use the
'Post to Web' feature of the Nokia 95.
With it, you can post photos directly to a directory
on your (PHP-enabled) server.

The Atom Push (Post?) protocol used for LifeBlog has
been published. Read it if you hit any snags in trying
to figure out what is happening.

It's a rather awkward protocol IMHO, and I only wrote
this hack to be able to upload photos myself, so dont
expect any further improvements. Use this hack / the
code as you please.

## Required ##

- Apache2
- PHP5
- Lifeblog-enabled mobile phone

## Installation and configuration ##

Unpack nokia-lifeblog-hack.tar.gz to a directory on your
PHP-enabled webserver.

See include.php. Add your own username/password combo,
and modify the $url_loc to point to the directory on
your server.

Make sure your data (or $store_dir) directory is
writable by the Apache2 user (www-data on Debian).

Now on your mobile phone (Nokia 95 as an example), do
the following:

 - Menu -> Applications -> Online Sharing
 - Options -> Settings
 - Add a Service provider
   - Name (can be anything)
   - Protocol (Atom)
   - Webadres (this directory on your webserver,
     i.e. http://myserver.com/nokia)
 - Add an Account
   - Account name (can be anything)
   - Service provider (name of the above)
   - Username (the $username you added to include.php)
   - Password (the $password you added to include.php)

Go back to Online Sharing. Select the Account, and let it
update the services. You will now get two new items in
Online Sharing: MyPoster and MyFeeder (or whatever you
specified in include.php). Make the MyPoster your
default.

*pfew*

Now, every time you post an item to the web these items
will be stored in the data directory on your server, directly
from your mobile phone!

## Exercises left for the reader (TODO) ##

 - Only MyPoster works, MyFeeder doesn't (yet)
 - Make a proper class out of the various files
 - Integration with Gallery2 / your favorite blog software