当前位置: 首页>>代码示例>>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;未经允许,请勿转载。