I need to do a simple GET request to EC2 Query API with regular URL encoded query string. The protocol is HTTPS. How would I send the request with the help of PHP\'s cURL.
This code can use to retrieve https requests
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'https://serverurl.com/');
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data1 = curl_exec($ch);
curl_close($ch);