Welcome Guest, Not a member yet? Register   Sign In
Using Phil Sturgeon’s REST client with Flickr api
#1

[eluser]Unknown[/eluser]
Hi to all i have a question about, REST Client Library, can use it with flickr api to search photo by tag?

Is this a correct usage of this library?
<?php
class Twitter extends Controller {

function __construct()
{
parent::Controller();

$this->load->library('rest', array(
http://www.flickr.com/services/rest/?
method=flickr.photos.search&
api_key=68149024a667e0be3c63708f002ffe1e&
tags=$tag
per_page=12
));

}

function show_photo($tag="dog")
{
if(!$tag)
{
show_error('No photo'));
}


$result = $this->rest->get('users/show/'.$tag);

foreach( $result as $tag => $value )
{
echo '<strong>'.$tag.':</strong> '.$value.'<br/>';
}

}

}

?&gt;




Theme © iAndrew 2016 - Forum software by © MyBB