Ethelcofie’s How To Articles

September 22, 2008

Life Hacks

Filed under: Experiences — ethelcofie @ 8:21 pm
Tags: , , , , ,


In need of quick design for a website, if you are like me and you probably developing the website as a favour to a friend or family member but don’t have enough time for drudging out designs your best bet is a free online CSS templates that you can download and personalize for use:

Else if you need to put together a simple a quick and easy website which you give over to user to take control of the content then your easiest bet is using word press as a Content Management System Mark Kirby has an excellent tutorial on his website

If you want to add an album to your website but don’t have the space or bandwidth I suggest use online photo social sites like and Flickr and use the API’s to retrieve images on demand Or just hotlink from your Facebook albums. A bit dodgy but it works!

I wrote a tutorial on how to use flickr API which I presented at Bar Camp Brighton 3

If you need to knock out your own custom social netwrok for your friends, family or people with similar interest( chocolate loving geeks perhaps !) then use It is great platform that allows you to create your own social network and even register a domain that points to your customized social network.

This section will be updated as often as i can with short cuts and life hacks… watch this space


May 19, 2008

Flickr API: How to perform Authentication using PHP

Filed under: Development Articles — ethelcofie @ 1:32 pm
Tags: ,

I presented this at Brighton BArCamp3 download power point

//1.Create a login link

$secret_key=’secret key’;

$params = array(
‘api_key’=> ‘api_key’,
‘perms’ => ‘write’);

$encoded_param = array();

//1.a Encode and organize authentication parameters

foreach($params as $key => $value)
$encoded_params[] = urlencode($key).’=’.urlencode($value);

//1b Create the api signature :an md5 of the parameters in alphabetic order


//1.c append api signature to url

$url =””.


header(‘Location:’.$url); –>This will then redirect back to your call back url and include a frob value

//2.Get and use frob to retrive authentication token

//2.a Get frob from url

if ($_REQUEST[‘frob’])
//using php_serial paramater serial to retrieve the format in serialized data structure
$frobparams = array(
‘api_key’=> ‘api_key’,
‘frob’ => ‘frob’ ,
‘method’ => ‘flickr.auth.getToken’,
‘format’ => ‘php_serial’);

$encoded_param = array();

foreach($frobparams as $key => $value)
$encoded_params[] = urlencode($key).’=’.urlencode($value);
$url = “”.implode(‘&’, $encoded_params);

//2.bCreate the api signature :an md5 of the parameters in alphabetic order



‘api_key’. $frobparams [‘api_key’].

‘format’.$frobparams [‘format’].



//2.c Construct url to auth.getToken


// 2.d Get url response/contents
$rsp = file_get_contents($url);

$rsp_obj = unserialize($rsp);


//2.e Glean Auth Token from $details

echo $details[‘auth’][‘token’][‘_content’];

//dispaly error message if there is a problem
echo $details [message] ;



Just getting started: The Authentication Token can then be ussed as part of the parameter for a method call

Create a free website or blog at