Welcome Guest, Not a member yet? Register   Sign In
phpFlickr as a Library
#8

[eluser]bugboy[/eluser]
right it was because i was using so you were right ha ha ha Wink

Code:
$this->phpFlickr->photos_getRecent();

instead of

Code:
$this->phpflickr->photos_getRecent();

Now thats working i'm not getting anything back at all which is now my next challange.

posted code

Code:
function index()
    {
    $this->load->library('phpFlickr');
    
    $recent = $this->phpflickr->photos_getRecent();
    print_r($recent);
    
    foreach ($recent['photo'] as $photo) {
        $owner = $this->phpflickr->people_getInfo($photo['owner']);
        echo "<a href='http://www.flickr.com/photos/" . $photo['owner'] . "/" . $photo['id'] . "/'>";
        echo $photo['title'];
        echo "</a> Owner: ";
        echo "<a href='http://www.flickr.com/people/" . $photo['owner'] . "/'>";
        echo $owner['username'];
        echo "</a><br>";
    }
    
    }

Its now throwing this error but i understand its because the foreach loop is empty


A PHP Error was encountered

Severity: Warning

Message: Invalid argument supplied for foreach()

Filename: controllers/flickr.php

Line Number: 20


Messages In This Thread
phpFlickr as a Library - by El Forum - 08-13-2007, 10:29 AM
phpFlickr as a Library - by El Forum - 09-27-2007, 06:59 AM
phpFlickr as a Library - by El Forum - 05-02-2008, 06:27 AM
phpFlickr as a Library - by El Forum - 05-02-2008, 06:54 AM
phpFlickr as a Library - by El Forum - 05-06-2008, 04:12 PM
phpFlickr as a Library - by El Forum - 05-06-2008, 04:19 PM
phpFlickr as a Library - by El Forum - 05-06-2008, 05:14 PM
phpFlickr as a Library - by El Forum - 05-07-2008, 02:06 AM
phpFlickr as a Library - by El Forum - 05-07-2008, 03:27 PM
phpFlickr as a Library - by El Forum - 09-05-2008, 06:01 AM
phpFlickr as a Library - by El Forum - 03-14-2009, 02:19 PM
phpFlickr as a Library - by El Forum - 03-31-2011, 09:51 AM
phpFlickr as a Library - by El Forum - 07-31-2011, 02:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB