I'm trying to connect using curl in PHP to Pronto Cycle Share (using PHP 5.6.2). This site works in the browser and from command line curl.
According to SSL Labs, it is only accepting TLS 1.2.
In PHP, using CURL (version 7.28.1) PHP fails to negotiate and gives me Curl error: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
Using file_get_contents, the code:
$ctx = stream_context_create([
'ssl' => [
'crypto_method' => STREAM_CRYPTO_METHOD_TLS_CLIENT
],
]);
$html = file_get_contents($url, false, $ctx);
Returns:
Message: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
print_r(OPENSSL_VERSION_TEXT)
says OpenSSL 0.9.8r 8 Feb 2011, so that's fairly old. I'm using MAMP PRO on the Mac.
Is there any way to connect to this server using simple PHP methods?