Can anybody tell me that how to fetch the content of https using curl or without curl?
Asked
Active
Viewed 289 times
0
-
Without cURL, you could use `openssl s_client -connect servername:port` – Bart Friederichs Feb 14 '13 at 08:41
-
@BartFriederichs: Can You please give me the complete code.. – Bhavnish Narang Feb 14 '13 at 09:35
-
@BhavnishNarang it is a commandline command that talks to an SSL host in the same way Telnet talks to a plain host. I leave it up to you to implement the rest. Hint: you'll have to implement the HTTP protocol yourself. – Bart Friederichs Feb 14 '13 at 09:41
-
@rikesh: i tried nothing bro...i want the complete code – Bhavnish Narang Feb 14 '13 at 09:47
-
$ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_FAILONERROR, 0); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); curl_setopt($ch, CURLOPT_URL, $fullurl); what we have to write in username and password... – Bhavnish Narang Feb 14 '13 at 09:52