Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First of all, after hours of frustration I find PHP way of doing this very retarded. Since this XML error was so persistent, I wanted to try this in Coldfusion and in 2-3 minutes, the whole thing was done, no XML errors, no SSL crap returned from the API. Anyway, enough with the venting! This is probably what you need to prevent that XML well formedness super duper message :</p> <pre><code>curl_setopt($ch, CURLOPT_POSTFIELDS, array("xmldata=" . $fields_string)); </code></pre> <p>Assuming you are following their documentation and you are holding the variables in fields_string all you need to do is type something that mimics a variable for the API. In this case, xmldata will do.</p> <p>I have yet to listen to the answer which throws this : <code>Curl error: SSL read: error:00000000:lib(0):func(0):reason(0), errno 104</code></p> <p>This is thanks to listening to the errors, otherwise $result returned empty after I got rid of XML error. So, here it goes :</p> <pre><code>$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, array("xmldata=" . $fields_string)); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $result = curl_exec($ch); if(curl_errno($ch)) echo 'Curl error: ' . curl_error($ch); else echo 'the return is ' . $result; </code></pre> <p>SSL is not setup yet so why the heck they bothered with CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST? It's not working even when it's false, this whole thing turned out Charlie Foxtrot!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload