Hey guys,
I used "curl" to emulate the browser in php. I am trying to retrieve content from a secure website (for instance https://www.bluetooth.org/) using following php script and using $data to store the retrieved contents.
<?
$ch = curl_init();
$url = "https://www.bluetooth.org/";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
//curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
//curl_setopt($ch, CURLOPT_PORT,443);
$data = curl_exec($ch);
print "result is * $data \n";
curl_close($ch);
?>
this just doesn't work. $data returns nothing. However if I use
$url = "http://www.google.com";
(substitute https with http)
it works. Does somebody know what's the problem.
The things that are commented in the code above that I've already
tried, but doesn't work.
Thanks