From: Steve Sutton Date: Mon, 10 Jul 2017 15:49:08 +0000 (-0400) Subject: Update for the fetch image X-Git-Tag: v1.0.5^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=deebac61f1d677bca25e98579e2c7e7f5d790891;p=WP-Plugins%2Fglm-wp-importer.git Update for the fetch image Slash is already in path. Need to ignore ssl verification. --- diff --git a/controllers/ToolboxImport.php b/controllers/ToolboxImport.php index 3454563..38937ff 100644 --- a/controllers/ToolboxImport.php +++ b/controllers/ToolboxImport.php @@ -288,11 +288,12 @@ $filename = wp_unique_filename($path, $file); $fp = fopen($path . '/' . $filename, 'w+'); - $fileUrl = ($baseUrl) ? $baseUrl . '/' . rawurlencode($file) : $this->_options['toolbox_image_url'] . $file; + $fileUrl = ($baseUrl) ? $baseUrl . rawurlencode($file) : $this->_options['toolbox_image_url'] . $file; $ch = curl_init($fileUrl); curl_setopt($ch, CURLOPT_TIMEOUT, 50); curl_setopt($ch, CURLOPT_FILE, $fp); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $imgData = curl_exec($ch); $httpCode = curl_getinfo($ch); curl_close($ch);