diff --git a/e107_handlers/file_class.php b/e107_handlers/file_class.php index e5bd00a84..7e722123c 100644 --- a/e107_handlers/file_class.php +++ b/e107_handlers/file_class.php @@ -581,7 +581,15 @@ class e_file if (function_exists('file_get_contents') && ini_get('allow_url_fopen')) { $old_timeout = e107_ini_set('default_socket_timeout', $timeout); - $data = file_get_contents($address); + + $context = array( + 'ssl' => array( + 'verify_peer' => false, + 'verify_peer_name' => false, + ), + ); + + $data = file_get_contents($address, false, stream_context_create($context)); // $data = file_get_contents(htmlspecialchars($address)); // buggy - sometimes fails. if ($old_timeout !== FALSE) diff --git a/e107_handlers/library_manager.php b/e107_handlers/library_manager.php index d33c0336c..70392b5cb 100644 --- a/e107_handlers/library_manager.php +++ b/e107_handlers/library_manager.php @@ -1599,7 +1599,7 @@ class e_library_manager // The library will be cached with version number, so this only run once per library. if(substr($file, 0, 4) == 'http') { - $content = file_get_contents($file); + $content = e107::getFile()->getRemoteContent($file); $tmpFile = tempnam(sys_get_temp_dir(), 'lib_'); if($tmpFile)