diff --git a/CHANGELOG b/CHANGELOG index 0a8d4d8..09f6cda 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ codebird-php - changelog ======================== +2.7.1 (2015-08-16) ++ #124 Download redirected remote images + 2.7.0 (2015-05-14) - #92, #108 Fix issues with uploading special chars + #109 Proxy support diff --git a/bower.json b/bower.json index 4abf678..88726dc 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "codebird-php", - "version": "2.7.0", + "version": "2.7.1", "homepage": "http://www.jublo.net/projects/codebird/php", "authors": [ "Joshua Atkins ", diff --git a/src/codebird.php b/src/codebird.php index a2cd342..0b07234 100644 --- a/src/codebird.php +++ b/src/codebird.php @@ -6,7 +6,7 @@ * A Twitter library in PHP. * * @package codebird - * @version 2.7.0 + * @version 2.7.1 * @author Jublo Solutions * @copyright 2010-2015 Jublo Solutions * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License 3.0 @@ -104,7 +104,7 @@ class Codebird /** * The current Codebird version */ - protected $_version = '2.7.0'; + protected $_version = '2.7.1'; /** * Auto-detect cURL absence @@ -716,7 +716,7 @@ protected function getCurlInitialization($url) protected function getNoCurlInitialization($url, $contextOptions, $hostname = '') { $httpOptions = array(); - + $httpOptions['header'] = array( 'User-Agent: codebird-php ' . $this->getVersion() . ' by Jublo Solutions ' ); @@ -1269,6 +1269,8 @@ protected function _buildMultipart($method, $params) // use hardcoded download timeouts for now curl_setopt($ch, _CURLOPT_TIMEOUT_MS, 5000); curl_setopt($ch, _CURLOPT_CONNECTTIMEOUT_MS, 2000); + // find files that have been redirected + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $result = curl_exec($ch); if ($result !== false) { $value = $result;