Here is what I have done.
Please keep in mind that there is a .dll file on the printer server that needs to be accessed.
<?php
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $thistext);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/xml',
'Content-Length: ' . strlen($thistext)) );
$result = curl_exec($ch);
print_r($result);
curl_close($ch);
?>
As you can see I modified your code to something slightly different.
I need to POST the xml to this .dll - I do not seem to be having any luck!
If I simply ping the .dll address from the server, it is successful - so I do not think it is network or firewall related.
Just my syntax