From deebac61f1d677bca25e98579e2c7e7f5d790891 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 10 Jul 2017 11:49:08 -0400 Subject: [PATCH] Update for the fetch image Slash is already in path. Need to ignore ssl verification. --- controllers/ToolboxImport.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.17.1