From 628ee9fb32d1320533d6870262bc48de1ffed709 Mon Sep 17 00:00:00 2001 From: Braulio Ribeiro Date: Fri, 25 Jul 2014 15:16:53 -0300 Subject: [PATCH] Added curl option Localhost don't work. $curl = false in line 48 fixes --- phpFlickr.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/phpFlickr.php b/phpFlickr.php index 975371e..d8f44e9 100644 --- a/phpFlickr.php +++ b/phpFlickr.php @@ -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 @@ -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); @@ -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. @@ -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. @@ -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.