當前位置: 首頁>>代碼示例>>PHP>>正文


PHP phpFlickr::async_upload方法代碼示例

本文整理匯總了PHP中phpFlickr::async_upload方法的典型用法代碼示例。如果您正苦於以下問題:PHP phpFlickr::async_upload方法的具體用法?PHP phpFlickr::async_upload怎麽用?PHP phpFlickr::async_upload使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在phpFlickr的用法示例。


在下文中一共展示了phpFlickr::async_upload方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: uploadPhoto

function uploadPhoto($path, $title)
{
    $apiKey = "3b7d4ab3e54988c4e6fd59d9e40ca28c";
    $apiSecret = "84d2e480c8e3c926";
    $permissions = "write";
    $token = "72157626228984291-4635fa88a6fed8f5";
    $f = new phpFlickr($apiKey, $apiSecret, true);
    $f->setToken($token);
    return $f->async_upload($path, $title);
}
開發者ID:ravikiranj,項目名稱:flickr-photo-uploader,代碼行數:10,代碼來源:index.php

示例2: upload_photo

function upload_photo($path, $title)
{
    $apiKey = "your-flickr-key";
    $apiSecret = "your-flickr-secret";
    $token = "flickr-token";
    $permissions = "write";
    $f = new phpFlickr($apiKey, $apiSecret, true);
    $f->setToken($token);
    $f->async_upload($path, $title);
    @unlink("temp.jpg");
}
開發者ID:peter279k,項目名稱:store_photo,代碼行數:11,代碼來源:new_photo_detect.php

示例3: uploadPhoto

 function uploadPhoto($fileID, $title = "", $description = "", $tag = "")
 {
     $flickr = new phpFlickr($this->getAPIKey(), $this->getAPISecret());
     $flickr->setToken($this->getAPIToken());
     if ($file = DataObject::get_by_id("File", $fileID)) {
         $flickr->async_upload($file->getFullPath(), $title, $description, $tag);
         return true;
     } else {
         return false;
     }
 }
開發者ID:SustainableCoastlines,項目名稱:loveyourwater,代碼行數:11,代碼來源:FlickrService.php

示例4: phpFlickr

<?php

require_once 'base_dato.php';
require_once "phpFlickr.php";
$f = new phpFlickr("<api key>");
// CAMBIOS A DIST
//$bd = new MysqliDb('localhost', 'josuelopez27_par', '23503360', 'josuelopez27_par');
//$connect = mysqli_connect("localhost","josuelopez27_par","23503360");
// CAMBIOS A PRUEBA
$bd = new MysqliDb('localhost', 'root', '', 'CATALOGO_PRUEBA');
$connect = mysqli_connect("localhost", "root", "");
if (!empty($_FILES)) {
    $tempPath = $_FILES['file']['tmp_name'];
    $uploadPath = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . $_FILES['file']['name'];
    move_uploaded_file($tempPath, $uploadPath);
    $apiKey = "5f1ba3cb88d4ed7b109be31f9fb928a4";
    $apiSecret = "13ce4def3dfd80d5";
    $permissions = "write";
    $token = "__your__generated__token__";
    $f = new phpFlickr($apiKey, $apiSecret, true);
    $f->setToken($token);
    return $f->async_upload($path, $title);
    $answer = array('answer' => 'File transfer completed');
    $json = json_encode($answer);
    echo $json;
} else {
    echo 'No files';
}
開發者ID:josue270193,項目名稱:Catalogo,代碼行數:28,代碼來源:upload.php


注:本文中的phpFlickr::async_upload方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。