I've not used PEAR before, and so I'm probably doing something dumb. I've installed the Xml_Tree,Net_Socket, but when I include it I just get an error. My entire code is this:
<?php
include_once('PEAR.php');
include_once('Net/Socket.php');
include_once('XML/Tree.php');
$dsc_header = array(
"POST /wswwdapi/wapi.asmx HTTP/1.1",
"Host: api.ote.wildwestdomains.com",
"Content-Type: text/xml; charset=utf-8",
"SOAPAction: \"http://ift.tt/W4XTNq
webservices/Describe\"");
$dsc_msg = '<?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://ift.tt/W4XTNr
envelope/">
<soap:Body>
<Describe xmlns="http://ift.tt/1pD0Kdp">
<sCLTRID>reseller.xxx</sCLTRID>
<credential>
<Account>xxxx</Account>
<Password>xxxxxxx</Password>
</credential>
</Describe>
</soap:Body>
</soap:Envelope>
';
$ch = curl_init("http://ift.tt/W4XTwY
wswwdapi/wapi.asmx?WSDL");
if ($ch == FALSE) {
echo "Connecting to createsend failed\n";
}
curl_setopt($ch,CURLOPT_HTTPHEADER, $dsc_header);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS, $dsc_msg);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch,CURLOPT_VERBOSE, 0);
$result = curl_exec($ch);
echo "Return XML:\n$result\n";
?>
But i am getting error :
Parse error: syntax error, unexpected 'clone' (T_CLONE), expecting identifier (T_STRING) in /usr/local/lib/php/XML/Tree.php on line 297
What to do ?
No comments:
Post a Comment