Do this ONLY if the server's certificate is invalid.
1 2 3
$ctx = stream_context_create(['ssl' => ['verify_peer' => false, 'verify_peer_name' => false]]); $res = file_get_contents("https://example.org", false, $ctx);