本文整理汇总了PHP中phpFlickr::auth_getFrob方法的典型用法代码示例。如果您正苦于以下问题:PHP phpFlickr::auth_getFrob方法的具体用法?PHP phpFlickr::auth_getFrob怎么用?PHP phpFlickr::auth_getFrob使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类phpFlickr
的用法示例。
在下文中一共展示了phpFlickr::auth_getFrob方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: phpFlickr
<?php
require_once 'phpFlickr/phpFlickr.php';
$key = "";
$secret = "";
$frob = "";
$token = "";
$f = new phpFlickr($key, $secret);
$read_directory = "/tmp/Snapshots/";
$write_directory = "/tmp/Snapshots_Bak/";
$title = "FlickrSync";
$desc = "FlickrSync";
$tags = "flickrsync";
if (empty($frob)) {
$frob = $f->auth_getFrob();
$api_sig = md5($secret . "api_key" . $key . "frob" . $frob . "permswrite");
$auth_url = "http://flickr.com/services/auth/?api_key={$key}&perms=write&frob={$frob}&api_sig={$api_sig}";
echo "TWO STEPS YOU MUST NOW TAKE:\n\n";
echo "1. SET THE frob VARIABLE TO: {$frob}\n\n";
echo "2. VISIT {$auth_url} AND APPROVE THE APPLICATION!\n\n";
echo "RERUN WHEN YOU HAVE SET FROB\n\n";
} elseif (empty($token)) {
$token = $f->auth_getToken($frob);
echo "PLEASE SET THE TOKEN VALUE TO THE TOKEN MENTIONED BELOW, SAVE, AND RERUN THE APPLICATION:";
echo print_r($token) . "\n\n\n";
} else {
$f->setToken($token);
echo "ENTERING MASTER LOOP\n";
while (1) {
echo "I'm awake!!!\n";
$filenames_to_upload = array();