Skip to content

Added curl option #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions phpFlickr.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ class phpFlickr {
var $last_request = null;
var $die_on_error;
var $error_code;
Var $error_msg;
var $error_msg;
var $token;
var $php_version;
var $custom_post = null, $custom_cache_get = null, $custom_cache_set = null;
var $curl = true;

/*
* When your database cache table hits this many rows, a cleanup
Expand Down Expand Up @@ -219,7 +220,7 @@ function post ($data, $type = null) {
die('There was some problem figuring out your endpoint');
}

if ( function_exists('curl_init') ) {
if ( function_exists('curl_init') && $this->curl==true ) {
// Has curl. Use it!
$curl = curl_init($this->rest_endpoint);
curl_setopt($curl, CURLOPT_POST, true);
Expand Down Expand Up @@ -401,7 +402,7 @@ function buildPhotoURL ($photo, $size = "Medium") {
}

function sync_upload ($photo, $title = null, $description = null, $tags = null, $is_public = null, $is_friend = null, $is_family = null) {
if ( function_exists('curl_init') ) {
if ( function_exists('curl_init') && $this->curl==true ) {
// Has curl. Use it!

//Process arguments, including method and login data.
Expand Down Expand Up @@ -463,7 +464,7 @@ function sync_upload ($photo, $title = null, $description = null, $tags = null,
}

function async_upload ($photo, $title = null, $description = null, $tags = null, $is_public = null, $is_friend = null, $is_family = null) {
if ( function_exists('curl_init') ) {
if ( function_exists('curl_init') && $this->curl==true ) {
// Has curl. Use it!

//Process arguments, including method and login data.
Expand Down Expand Up @@ -524,7 +525,7 @@ function async_upload ($photo, $title = null, $description = null, $tags = null,

// Interface for new replace API method.
function replace ($photo, $photo_id, $async = null) {
if ( function_exists('curl_init') ) {
if ( function_exists('curl_init') && $this->curl==true ) {
// Has curl. Use it!

//Process arguments, including method and login data.
Expand Down