Jump to content

PHP Flickr


xymalf

Recommended Posts

<?php

 

 

require_once("phpFlickr.php");

$phpFlickrObj = new phpFlickr('1a2755a9a5a19904c7f5e661d85db657');

 

$user = $phpFlickrObj->people_findByUsername('stathisg');

$user_url = $phpFlickrObj->urls_getUserPhotos($user['id']);

$photos = $phpFlickrObj->people_getPublicPhotos($user['id'], NULL, NULL, 4);

 

foreach ($photos['photos']['photo'] as $photo)

{

  echo '<a href="'.$user_url.$photo['id'].'" title="'.$photo['title'].' (on Flickr)" target="_blank">';

  echo '<img alt="'.$photo['title'].'" src="'.$phpFlickrObj->buildPhotoURL($photo, "square").'" />';

  echo '</a>';

}

 

?>

 

I am using the above index.php file as my call back url from flickr

when i try and run the code above all i see is a blank page - what is wrong?

 

Also I want to connect to mySQL data base

 

 

DEFINE ('DB_USER', 'xymalfco1');

DEFINE ('DB_PASSWORD', 'po');

DEFINE ('DB_HOST', '217.174.253.');

DEFINE ('DB_NAME', 'xymalfco1');

 

the above definitions don't seem to work.

 

What I want to create is a page of the Flickr users photo's that are authorised by the Auth.php file and then displays the users and those people he follows photos.

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/265582-php-flickr/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.