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

curl-and-php

Re: cURL and secure server

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 9 Mar 2004 22:34:41 +0100 (CET)

On Tue, 9 Mar 2004, Michael Sisson wrote:

> So if you use curlopt_cookiejar and cookiefile, then curl will automatically
> get the cookie on login and use it in the request?

If you use both options, curl will both read cookies from a file and use them
when communicating with a server, and it will store cookies it receives in a
file when done.

> Also, how do you handle the sending (posting) and recieving of data?

Generally speaking: CURLOPT_POSTFIELDS for posting.

> The way I understand it, the $result = curl_exec($ch); would put the info
> recieved in $result?

If you have CURLOPT_RETURNTRANSFER set, yes.

> Which in this case would be xml data and then I could just parse $result?

Yes, if the transfer worked.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
Received on 2004-03-09