Hello,
I am trying to get a page vis SSL and this is what I have tried without any success. I'm running on php 4.3.8. Please help me:
My first try:
$url='https://www.openssl.org';
$filepointer = fopen($url,"r");
if($filepointer){
while(!feof($filepointer)){
$buffer = fgets($filepointer, 4096);
$file .= $buffer;
}
fclose($filepointer);
$statcode = 1;
} else {
$statcode = 0;
}
echo $file;
this works for http pages, but not https 🙁
so I tried this:
$url = 'https://www.openssl.org/index.html';
if (!$curld = curl_init()) {
echo "Could not initialize cURL session.\n";
exit;
}
curl_setopt($curld, CURLOPT_URL, $url);
curl_setopt($curld, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($curld);
curl_close($curld);
echo $output;
again it works with http but not https.
both of examples give me absolute nothing. I have put a echo 'hello' in the first row, and a echo 'done' and the end and the hello and done is all I get. My final target will have lots of parameters, but for now I 'm trying to get a simple html.
Hope you can help me.. desparate now