curl Question
| From: | Sonia Tsui | Date: | Thu, 04 Jan 2001 00:36:20 +0000 |
| Subject: | curl Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-32583@lists.php.net to get a copy of this message | ||
Hi,
Has anyone ever used libcurl with PHP? libcurl is a library that allows you
to connect and communicate to many different types of servers with many
different types of protocols (eg httpds). What I don't understand is when do
we need to use curl functions. In the documentation, an example is given as
follows:
<?php
$ch = curl_init ("http://www.php.net/");
$fp = fopen ("php_homepage.txt", "w");
curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec ($ch);
curl_close ($ch);
fclose ($fp);
?>
This example uses PHP's CURL module to fetch the PHP homepage. But why do we
need to use those curl functions at all??
I am getting so confused aboout writing client scripts which has to
communicate with httpds. Would the standard client scripts work the same in
a secure enviroment as in a standard one (httpd)? My understanding is that
if I want to program clients that access secure web servers, I need to use
say a perl module which allows me to SSL functions. If I just want to view
web pages on https servers, I do not need this since my web browser already
know to do that
Anyone who has experience or know anything in about writing client scripts
which talks to secure web server (httpds), please help me in clearing up the
concepts.
thanks
---Sonia