1.開啟soap支援,在php.ini中去除extension=php_soap.dll之前的‘;’
2.掉用頁面
<?php
header('Content-Type: text/html; charset=UTF-8');
$client = new SoapClient('http://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmx?WSDL');
$parm=array('mobileCode'=>'13782149159','userID'=>'');
$result=$client->getMobileCodeInfo($parm);
$result=get_object_vars($result); //将stdclass object轉換為array,這個比較重要了
echo "你的手機卡資訊:".$result['getMobileCodeInfoResult'];
?>
就這麼簡單了。。