Can't help you with your code but, you may want to check out the snoopy
class at Sourceforge.net.

http://sourceforge.net/projects/snoopy/

It uses ssl and cURL.  Works pretty well.

Kevin Leavell
Leavell Digital Design Inc.
P 406.829.8989
C 406.240.4595

---> -----Original Message-----
---> From: phpman [mailto:[EMAIL PROTECTED]]
---> Sent: Tuesday, May 15, 2001 4:43 PM
---> To: [EMAIL PROTECTED]
---> Subject: [PHP] SSL and CURL question --
--->
--->
---> CURL is realy cool, lets me do easy socket stuff, especially with
---> ssl, which leads me to my question:
--->
---> How on God's green earth do I send more then simple requests to a SSL
---> server? Here's my basic request...
--->
---> POST /apps.here/xml/Rate HTTP/1.1
---> Content-Type: application/xml
---> Content-Length: 1074
--->
---> <?xml version=1.0 encoding="UTF-8"?>
---> <xml stuff here>blah.......</xml stuff here>
--->
--->
---> the CURL code (so far)
--->
---> $xml_req="this is the xml doc";
---> $l=strlen($xml_req);
--->
---> $url="https://www.secureserver.com/apps.here/xml/Rate";;
---> $tmp_out=time() . ".tmp.xml.out";
---> $fp = fopen ("/public/nirvana/" . $tmp_out, "w+");
---> fwrite($fp, $xml_req, $l);
--->
---> $ch = curl_init ();
---> curl_setopt ($ch, CURLOPT_URL, $url);
---> curl_setopt ($ch, CURLOPT_SSLVERSION, 3);
---> curl_setopt ($ch, CURLOPT_HEADER, 0);
---> curl_setopt ($ch, CURLOPT_CUSTOMREQUEST, "POST /apps.here/xml/Rate
---> HTTP/1.1");
---> curl_setopt ($ch, CURLOPT_HTTPHEADER, "Content-Type: application/xml");
---> curl_setopt ($ch, CURLOPT_INFILE, $fp);
---> curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
---> // curl_setopt ($ch, CURLOPT_VERBOSE, 1);
---> // curl_setopt ($ch, CURLOPT_POST, 1);
--->
---> $results = curl_exec ($ch);
---> fclose($fp);
---> curl_close ($ch);
--->
--->
--->
---> the tmp xml file displays the correct stuff. I'm totally
---> confused and there
---> is basically NO curl ssl support docs anywhere.
--->
---> distraut in buffalo,
--->
---> dave
--->
--->
--->
--->
---> --
---> PHP General Mailing List (http://www.php.net/)
---> To unsubscribe, e-mail: [EMAIL PROTECTED]
---> For additional commands, e-mail: [EMAIL PROTECTED]
---> To contact the list administrators, e-mail:
---> [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to