<html><body>
<?
//** PLEASE READ DOCUMENT PROVIDED WITH THIS SAMPLE BEFORE TESTING SAMPLE **
//
//   PHP Web Service Sample
//     
//   sample of SOAP Method : SendTextSMS  , GetCreditsLeft


// include soap client class
include("SOAP/Client.php");

$soapclient = new SOAP_Client("http://www.redcoal.com/xmlserver/soapserver.dll/wsdl/ISoapServer","wsdl");

$OutValue="";

//
// if you can configure the extension then use the following method for calling
// Remote sOAP methods 
//

//if (extension_loaded('overload')) {
//	print "\n<br>Result:";
//        $ret=$soapclient->SendTextSMS("94765-49251-11951-66295","abc123",
// 	                "+61413328449","myMessage","MyEmail","myName",0,OutValue);
//	print_r($OutValue);
//	print "\n\n";
//}


//
//  else then
//  do it this way 

print_r($soapclient->call("SendTextSMS",array("strInSerialNo"=>"94765-49251-11951-66295","strInSMSKey" =>"abc1234","strInRecipients"=>"+61413328449","strInMessageText"=>"myMessage","strInReplyEmail"=>"MyEmail","strInOriginator"=>"myName","iInType"=>"0","strOutMessageIDs"=>$OutValue)));

$CreditsLeft=-1;

print_r($soapclient->call("GetCreditsLeft",array("strInSerialNo"=>"94765-49251-11951-66295","strInSMSKey" =>"abc1234","dOutCreditsLeft"=>$CreditsLeft)));

// 
//

unset($soapclient);

?>
</html></body>
