Hello everyone.... this is my first post here at PHP Builder.
I've been working with PHP for a while now but at the moment I'm having trouble and I need some help from some people smarter than me 🙂
First, this script is supposed to post XML data and receive a response. Simple.
Second, it was working fine on my previous host (PHP4), now I have a new host (PHP5) and it loads to a blank page, no error, no nothing. I've checked with my new host and Curl is supported and they are for sure using PHP5.
Here's the code:
Any help is appreciated, it's actually a really urgent matter that I get this working.
<?
if ($SuperServiceNumber > "") {
// Suspend the customer service and place on DEACTIATED status
$XPost = "<?xml version='1.0' encoding='UTF-8'?>";
$XPost .= "<ProvisionRequest xmlns=\"http://tempuri.org/ProvisionRequest.xsd\">";
$XPost .= "<Credentials>";
$XPost .= "<Token>397710</Token>";
$XPost .= "<TokenKey>89s3l1er?</TokenKey>";
$XPost .= "</Credentials>";
$XPost .= "<DisconnectService>";
$XPost .= "<ServiceNumber>$SuperServiceNumber</ServiceNumber>";
$XPost .= "</DisconnectService>";
$XPost .= "</ProvisionRequest>";
$url = "https://exampleurx.com/Provison.asmx"; // enter the URL to post to here
$ch = curl_init(); // initialize curl handle
curl_setopt($ch, CURLOPT_URL,$url); // set url to post to
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
curl_setopt($ch, CURLOPT_HEADER, 1); // capture the returned headers
curl_setopt($ch, CURLOPT_TIMEOUT, 100); // times out
curl_setopt($ch, CURLOPT_POSTFIELDS, $XPost); // add POST fields
$runit = curl_exec($ch); // run the whole process
$message = preg_replace('/[^0-9]/', '', $message);
echo $runit;
echo $message;
}
?>