PHP file_get_contents() returns “failed to open stream: HTTP request failed!”

Try using cURL. <?php $curl_handle=curl_init(); curl_setopt($curl_handle, CURLOPT_URL,’http://###.##.##.##/mp/get?mpsrc=http://mybucket.s3.amazonaws.com/11111.mpg&mpaction=convert format=flv’); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl_handle, CURLOPT_USERAGENT, ‘Your application name’); $query = curl_exec($curl_handle); curl_close($curl_handle); ?>

file_get_contents(): SSL operation failed with code 1, Failed to enable crypto

This was an enormously helpful link to find: http://php.net/manual/en/migration56.openssl.php An official document describing the changes made to open ssl in PHP 5.6 From here I learned of one more parameter I should have set to false: “verify_peer_name”=>false Note: This has very significant security implications. Disabling verification potentially permits a MITM attacker to use an invalid … Read more