I'm trying to make a request to Cloudflare Websites. Until yesterday I had a working script but now it seems like the requests are sent back empty. Now the problem seems to be very weird because of the following reasons: *It was working fine until yesterday. *It happens only on websites require an SSL connection. *The same code works on my localhost, but not on my server.
Here's the code that I'm using:
$ch = curl_init();
$curlConfig = array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6',
CURLOPT_FOLLOWLOCATION => 1
);
curl_setopt_array($ch, $curlConfig);
$result = curl_exec($ch);
curl_close($ch);
As you can see the code is very simple but I just can't figure out why it would not work on my server while on my localhost (XAMPP) it works great.
Thanks ahead and have a great day!