I am trying to figure out if my server can make outbound https request(more specifically port 443) by using cURL, but the code is neither loading any page content nor giving any error.
<?php
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "https://www.google.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
$response = curl_exec($ch);
echo $response;
// close cURL resource, and free up system resources
curl_close($ch);
?>
I am new to the use of cURL, but shouldnt it load the content of google's home page?