cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Open a SSL page

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 21 May 2001 11:29:34 +0200 (MET DST)

On Mon, 21 May 2001, David THOMAS wrote:

> Please I need a working example for openning a SSL page and having it
> into a file

If you have a SSL-enabled libcurl, you fetch https:// the same way you fetch
http:// or ftp:// URLs...

<?php

$ch = curl_init ("https://www.openssl.org/");
$fp = fopen ("openssl_homepage.txt", "w");

curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_HEADER, 0);

curl_exec ($ch);
curl_close ($ch);
fclose ($fp);
?>

-- 
     Daniel Stenberg -- curl dude -- http://curl.haxx.se/
_______________________________________________
Curl-and-php mailing list
Curl-and-php_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-and-php
Received on 2001-05-21