Reputation: 5377
Though I have written ini_setdisplay errors at top of the page, the page is blank.
error_reporting(E_ALL);
ini_set('display_errors', 1);
$xml_data = '
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<WebLogin xmlns="http://www.example.com/2005/">
<userLoginPlain>sdf</userLoginPlain>
<passwordPlain>sdsf</passwordPlain>
<keyOverride>sdfsdf</keyOverride>
</WebLogin>
</soap:Body>
</soap:Envelope>
';
$URL = "https:///exampleff.com/ForumXML.asmx";
$ch = curl_init($URL);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
print_r($output);
Upvotes: 1
Views: 33
Reputation: 785
It because you receive XML, press [F12] in Chrome to see.
And will be better use SOAP-client for communicate with SOAP-server Look more http://php.net/manual/en/book.soap.php
Upvotes: 2