PHP调用SOAP

1.使用php5中的SoapClient;
2.php文件要用utf-8编码,不然中文会出问题。
3.php的libxml和soap要打开

示例:

<?php $client = new SoapClient("http://service.acesms.com/services.php?wsdl"); $arr=array("Unitid"=>168,"Username"=>"Username","Password"=>"Password","Message"=>"China 中国","Phone"=>"15827212345;13545007935"); $result=$client->__call("SendMessage",$arr); print_r("返回:".$result->State.'<br />'); echo date('<br />Y-m-d H:i:s',time()); ?>

你可能感兴趣的:(PHP,Date,SOAP)