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

curl-and-php

Need to pull header fields out of https post reply

From: Martin Turner <mturner582_at_hotmail.com>
Date: Thu, 21 Nov 2002 01:23:59 -0800

I am trying to write the cURL code to connect to Authorize.Net's SSL
gateway. I think I have got the first part under control. In my php script
on my web server, I used the code fragment:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
"https://secure.authorize.net/gateway/transact.dll");
curl_exec($ch);
curl_close($ch);

I did have a few more lines to open/create a file on my web server and
write the response into there, but that was causing errors when the
web server tried to write out many image files that didn't exist on my
machine. This is a win32 platform with write access to that dir. So
I removed that portion from the script.

What I want to do is read the header field contents that come back, parse
certain fields, and then prepare my html response for the client browser. Is
there an easy way to do this? Any code examples would be appreciated. I am a
newcomer to php and cURL.

Thanks.

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-11-21