PLS HELP!!! CURL HTTPS(secure layer issue)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Sourabh
Forum Newbie
Posts: 7
Joined: Sat Sep 13, 2008 2:18 am

PLS HELP!!! CURL HTTPS(secure layer issue)

Post by Sourabh »

Hi,

Pls help me on this when I am trying to print the output of the http://www.google.com I get the appropriate output. So if anybody can help how to do this here for secure layer(HTTPS).

<?php
$curl_handle=curl_init();
//curl_setopt($curl_handle,CURLOPT_URL,'https://secure.charge1.com/api/transact ... ount=10.00');
curl_setopt($curl_handle,CURLOPT_URL,'http://www.google.com');
//curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);

if (empty($buffer))
{
print "Sorry, example.com are a bunch of poopy-heads.<p>";
}
else
{
print $buffer;
}
?>

Thanks in advance,
Sourabh
Post Reply