Using below code to send request over TLS v1.0.
$url = "https://example.com";
$input_segment = "";
$data = array('InputSegments'=>$input_segment, 'cmdSubmit'=>'Submit');
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'TLSv1');
curl_setopt($ch, CURLOPT_PORT, "443");
curl_setopt($ch, CURLOPT_SSLVERSION, 4);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/x-www-form-urlencoded'
));
$response = curl_exec($ch);
$info = curl_getinfo($ch);
$err_no = curl_errno($ch);
$err = curl_error($ch);
curl_close($ch);
var_dump($response);
ERROR
Error #:SSL read: error:00000000:lib(0):func(0):reason(0), errno 104
It looks like still using SSL. How to send curl request over TLSv1.0 in PHP?