I am trying to open a https site , using curl in php . But I am getting a blank page .Though when i checked I can find that the httpcode returned is 200. I am able to open the same page using the browser . I have disbaled the ssl verifyer and ssl_verify host since the host name and the name in the certifcate was different .
Here is my code any help would be useful
<?php
$url = "https://abcde.com/";
$ch = curl_init($url);
echo "init";
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 200);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_USERPWD,"uname:pwd");
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,1);
$curl_scraped_page= curl_exec($ch);
$httpCode=curl_getinfo($ch, CURLINFO_HTTP_CODE);
if(!$curl_scraped_page)
{
echo "first learn";
}
echo $httpCode ;
echo $curl_scraped_page;
curl_close($ch);
?>