Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
This is a PHP5 wrapper for the popular Flickr Service. The basic api-methods are implemented have a own class-method. (not maintained anymore)
PHP
tree: b83b81ab45
Failed to load latest commit information.
README.md
flickr.php Change version number
license.txt initial commit

README.md

Flickr PHP API

Why this class

I was searching for a good PHP5 class, one without PHP4 support. One that use cURL for the REST-API from Flickr. With this API I wanted to give users the chance to decide in wich format they want their results and support some basic methods and the more advanced are possible with the custom query.

How to use

Setting API-key and default return format

<?php
    include('flickr.php');

    // set the API-key
    Flickr::setApikey('API-key'); // change 'API-key' with yours

    // set the default return format
    // default is set to Flickr::JSON
    Flickr::setFormat(Flickr::PHP); // Flickr::PHP is a format for returning a serialized array

    $params = array(
       'method' => 'flickr.test.echo',
       'foo' => 'bar',
    );

    $flickr_results = Flickr::makeCall($params);
?>

Setting it all together in one request

<?php
    include('flickr.php');

    $params = array(
       'api_key' => 'API-key',
       'format' => Flickr::XML,
       'method' => 'flickr.test.echo',
       'foo' => 'bar',
    );

    $flickr_results = Flickr::makeCall($params);
?>

Issues/Bugs

If you find one, please inform us with the issue tracker on github.

Changelog

Flickr 0.6.1 - 02/05/2010

  • [bug] deleted CURLOPT_FOLLOWLOCATION that causes errors on shared webhosting

Flickr 0.6 - 13/04/2010

  • [bug] Error-number with curl is returning an int and defaults to 0

Flickr 0.5 - 20/03/2010

  • Initial version of the PHP-wrapper

Feature Requests / To come

If you want something to add on this plugin, feel free to fork the project on github or add an issue as a feature request.

License

This plugin has a BSD License. You can find the license in license.txt that is included with class-package

Something went wrong with that request. Please try again.