I use following PHP function:
file_get_contents(\'http://example.com\');
Whenever I do this on a certain server, the result is empty. When I do
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.your_external_website.com"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $result = curl_exec($ch); curl_close($ch);
is best for http url, But how to open https url help me