File_get_contents () gets HTTPS for this error unable to find the wrapper "https" –did
Solution One, if you are using the server, you can refer to this approach, modify the PHP configuration file (win host) to support HTTPS
Find and modify in php.ini
Extension=php_openssl.dll
Allow_url_include = On
Restart the service on it, if you are a Linux server, Linux under the PHP, you must install the OpenSSL module, installed in the future can be visited.
Solution Two, if you are not using the server, you use the host, you cannot change the configuration of PHP, you can use the Curl function to replace the file_get_contents function, of course, your host must support the Curl function.
<?php
function Getsslpage ($url) {
$ch = Curl_init ();
curl_setopt ($ch, Curlopt_ssl_verifypeer, FALSE);
curl_setopt ($ch, Curlopt_header, false);
curl_setopt ($ch, curlopt_followlocation, true);
curl_setopt ($ch, Curlopt_url, $url);
curl_setopt ($ch, Curlopt_referer, $url);
curl_setopt ($ch, Curlopt_returntransfer, TRUE);
$result = curl_exec ($ch);
Curl_close ($ch);
return $result;
}
echo getsslpage ($_get[' url '));
?>
Check to see if the host supports PHP's file_get_contents function
Talk about the code stored as a PHP file, running in space, you can get results.
<?php
Echo ' Curl: ', function_exists (' curl_version ')? ' Enabled ': ' Disabled '. ' <br/>
File_get_contents: ', file_get_contents (__file__)? ' Enabled ': ' Disabled ';
?>