I am getting following error when using PHP get_contents()
:
What am i missing here? It work perfectly in Local Server with XAMPP.
PHP Version 5.3.29
SSL Version OpenSSL/0.9.8b
Warning: file_get_contents() [function.file-get-contents]: SSL operation failed with code 1. OpenSSL Error messages: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure in /home/XXXXXX/public_html/test.php on line 21
Warning: file_get_contents() [function.file-get-contents]: Failed to enable crypto in /home/xxxxx/public_html/test.php on line 21
Warning: file_get_contents(https://.....XXXXXX) [function.file-get-contents]: failed to open stream: operation failed
$url_api = "XXXXXXXXXXXXXX";
$getResult = array(
"ssl" => array(
"verify_peer" => false,
"verify_peer_name" => false,
),
'http'=>array(
'method'=>"GET",
'header'=>"XXXXXX: xxxxxxxxxx\r\n"
));
$getContext = stream_context_create($getResult);
$getResponse = file_get_contents($url_api, false, $getContext);
allow_url_fopen
is On? – SLY