本文整理匯總了PHP中phpFlickr::collections_getTree方法的典型用法代碼示例。如果您正苦於以下問題:PHP phpFlickr::collections_getTree方法的具體用法?PHP phpFlickr::collections_getTree怎麽用?PHP phpFlickr::collections_getTree使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類phpFlickr
的用法示例。
在下文中一共展示了phpFlickr::collections_getTree方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: phpFlickr
<?php
$f = new phpFlickr($apiKey);
$page = $_GET['page'];
if ($page == null) {
$page = 'home';
}
$setId = $_GET['setId'];
if ($page == "blog") {
$setId = $blog;
}
if ($page == "about") {
$setId = $about;
}
$collections = $f->collections_getTree($collectionId, $user);
if ($setId) {
$photos = $f->photosets_getPhotos($setId);
$info = $f->photosets_getInfo($setId);
$title = $info['title'];
$description = $info['description'];
foreach ($photos['photoset']['photo'] as $photo) {
$photoURL[] = "http://www.flickr.com/photos/" . $user . "/" . $photo['id'];
$photoLink[] = $f->buildPhotoURL($photo, 'large');
$info = $f->photos_getInfo($photo['id']);
$pTitle[] = $info['title'];
$pDescription[] = $info['description'];
}
}
foreach ($collections['collections']['collection'] as $collection) {
if ($collection['id'] != $collectionId) {
$workId[] = $collection['set'][0]['id'];