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

curl-and-php

Re: Curl SSL problem

From: Michael Horowitz <michael_at_yourcomputerconsultant.com>
Date: Tue, 18 Mar 2008 00:03:30 -0400

I have managed to write a curl function to correctly post using Curl a
regular form

<?php
$ch= curl_init();
curl_setopt($ch, CURLOPT_URL, "myurl.com/test.php");
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "Hello=World$Foo=Bar&Baz=Wombat");
curl_exec($ch);
curl_close($ch);

?>

However the same script fails to post correctly when I post xml

<?php
require 'createquidataxml.php';
$xmlResult = simplexml_load_string($result);
$ch= curl_init();
curl_setopt($ch, CURLOPT_URL, "myurl.com/test.php");
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlResult);
curl_exec($ch);
curl_close($ch);

?>

I am sure I am down to a simple setting at this point.

Michael Horowitz
Your Computer Consultant
http://yourcomputerconsultant.com
561-394-9079

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-03-18