Discussions
webservice issue connecting via curl
Hi everyone,
currently trying to post some data to the Netsuite webservice, using PHP. We dont wish to use the php library but rather just use Curl to push the data into Netsuite.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->wdsl);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_REFERER, $this->wdsl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml; charset="utf-8"', 'SoapAction: add', 'Content-Length: '.strlen(trim($myXml)), 'content-type: text/xml', 'Cache-Control: no-cache', 'Pragma: no-cache'));