• Client login
  • Work for us

All the latest from the team...

Monday, 23 February 2009

Connecting with the Flickr API through PHP

Here at Code Required we've been playing with a lot of the Social networking apps over the months... Years and have started to think about the potential of putting them all together and seeing what comes out the other end...

We'll be posting samples of what you can do here and would love you guys to post your samples too!

Anyway to kick off here's how to get a list of your photos from Flickr using the phpFlickr class:

$f = new phpFlickr("YOUR_API_KEY");
$i = 0;

// Find the NSID of the username inputted via the form
$person = $f->people_findByUsername('YOUR_USER_NAME');

// Get the friendly URL of the user's photos
$photos_url = $f->urls_getUserPhotos($person['id']);

// Get the user's first 36 public photos
$photos = $f->people_getPublicPhotos($person['id'], NULL, 1, 8);

// Loop through the photos and output the html
foreach ((array)$photos['photos']['photo'] as $photo) {
echo "
<a href='".$f->buildPhotoURL($photo)."'>";
echo "<img width='43' style='margin:4px' border='0' alt='$photo[title]' ". //
>
"src='" . $f->buildPhotoURL($photo, "Square") . "' />";
echo "</a
>";
$i++;
// If it reaches the sixth photo, insert a line break
if ($i % 4 == 0) {
echo "
";
}
}


You can get your Flickr API key here and explore more cool stuff in the Flickr API Docs

Have fun!

Labels: , , , ,

Monday, 11 August 2008

Code Required's Desktop RSS Reader

Hi Code Required fans... (All 2 of us according to Technorati but I'm sure more of you love reading our ramblers than that... Well I hope so anyway).

We've created a Yahoo Widget so you can view all the latest news and views from Code Required directly on your desktop.

You can download our desktop rss reader here

Labels: , , , , , ,

Tuesday, 4 March 2008

Code Required launches our bookshop online!

That's right with the help of our friend's over at Amazon we've gone all ecommerce and added a list of our favourite books onto the website so you can see which books we use and grab them for yourselves!

The store is based on Amazon's store and uses their checkout too so you even get the knowledge that you're shopping safely and securely with one of the World's leading bookshops!

Check it out at: http://www.coderequired.com/bookshop/

Labels: , , ,

RSS feed ATOM feed Add to Technorati Favorites View Jon Harvey's profile on LinkedIn