cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-and-php mailing list Archives

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

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET