Curl gives me following error:
error:140773F2:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert unexpected message
What does this mean?
It means bad SSL handshake. You will need to specify the version of the protocol like this:
curl_setopt($curl_connection, CURLOPT_SSLVERSION, 3);
Change 3 to 2 if you still get the error.