Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <?php if (!defined('BASEPATH')) {exit('No direct script access allowed');}
  2.  
  3. class Zend
  4. {
  5.  
  6. function __construct()
  7. {
  8.  
  9. ini_set('include_path',
  10. ini_get('include_path') . PATH_SEPARATOR . APPPATH . 'libraries');
  11.  
  12. }
  13.  
  14.  
  15. function load($class)
  16. {
  17. require_once (string) $class . EXT;
  18.  
  19. }
  20. }
  21.  
  22. ?>
  23.  
  24. <?php
  25.  
  26. class Welcome extends Controller {
  27.  
  28. function Welcome()
  29. {
  30. parent::Controller();
  31. }
  32.  
  33. function index()
  34. {
  35. $this->load->library('zend');
  36. $this->zend->load('Zend/Service/Flickr');
  37.  
  38. $flickr = new Zend_Service_Flickr('12e99caebb8f305fff5a943606ecde18');
  39.  
  40. $results = $flickr->tagSearch('worldcup');
  41.  
  42.  
  43.  
  44. foreach ($results as $result)
  45. {
  46.  
  47. $photo = $result->Small;
  48. echo "<a href="{$photo->clickUri}"><img src="{$photo->uri}" /></a><br /><br />";
  49.  
  50. }
  51.  
  52. }
  53. }
  54. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement