I am trying to get some data from a website where you need to have a SSL certificate to be able to connect to it. I have found the following code :
// create curl resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, $host);
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, $host);
// $output contains the output string
$output = curl_exec($ch);
// close curl resource to free up system resources
curl_close($ch);
The cURL query works well, but the data that I get is this one :
400 No required SSL certificate was sent400 Bad Request
No required SSL certificate was sent
nginx
What I am looking for is the data contained in the index.php (and the other paths) of the website. So, how can I do to add a Certificate to the code, and, using cURL, get the data from the website ? PS : Will the data will be in JSON format ? PPS : if this can be helpfull, I am using PHPStorm