本文整理汇总了PHP中phpFlickr::photos_geo_getLocation方法的典型用法代码示例。如果您正苦于以下问题:PHP phpFlickr::photos_geo_getLocation方法的具体用法?PHP phpFlickr::photos_geo_getLocation怎么用?PHP phpFlickr::photos_geo_getLocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类phpFlickr
的用法示例。
在下文中一共展示了phpFlickr::photos_geo_getLocation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$query = array("per_page" => "500", "sort" => "date-posted-desc", "group_id" => "1011166@N22", "has_geo" => "true");
$search = $f->photos_search($query);
echo "f:";
print_r($search);
foreach ($search['photo'] as $photo) {
$photoid_match = $photo['id'];
//echo($photoid_match);
// if ($photo['id'] <= $since_id) continue;
$idmatches = preg_grep("#{$photoid_match}#", $allflickrids);
// print_r($idmatches);
if (sizeof($idmatches) > 0) {
continue;
}
$owner = $f->people_getInfo($photo['owner']);
$info = $f->photos_getInfo($photo['id']);
$geo = $f->photos_geo_getLocation($photo['id']);
// print_r($info);
$obslat = $geo['location']['latitude'];
$obslng = $geo['location']['longitude'];
$flickrid = quote_smart(htmlentities(strip_tags($photo['id'])));
$obsdatetime = quote_smart(htmlentities(strip_tags($info['dates']['taken'])));
$obstype = quote_smart('flickr');
$obsemail = quote_smart(htmlentities(strip_tags($owner['username'])));
$obsnotes = quote_smart(htmlentities(strip_tags($photo['title'])));
$link_a = "http://www.flickr.com/photos/" . $photo['owner'] . "/" . $photo['id'];
$link = quote_smart($link_a);
$photolink_d = 'http://farm' . $info['farm'] . '.static.flickr.com/' . $info['server'] . '/' . $info['id'] . '_' . $info['secret'] . '_m.jpg';
savePhoto($photolink_d, $photo['id']);
$photolink = quote_smart($photolink_d);
$insert = sprintf("INSERT INTO icrows (id, flickrid, obsdatetime, obstype, flickrowner, obsnotes, obslat, obslng, link, photolink) VALUES ('',%s,%s,%s,%s,%s,%s,%s,%s,%s)", $flickrid, $obsdatetime, $obstype, $obsemail, $obsnotes, $obslat, $obslng, $link, $photolink);
// echo("$insert" . "\n<br>");