什么是webservice?
简单见就是你的网站可以使用其他网站的资源。
使用:
修改PHP配置文件 打开extension=PHP_soap.dll
下面是一个具体使用:
http://webservice.webxml.com.cn/webservices/mobilecodews.asmx?wsdl
使用代码:
<?PHP //利用soapclient 来请求webservice服务器 //通过wsdl,即可了解webservice可调用的方法和细节 WSDL 说明书 $soapclient = new soapClient("http://webservice.webxml.com.cn/webservices/mobilecodews.asmx?wsdl"); /* print_r($soapclient -> __getFunctions()); //分析webservice有哪些方法可以调用 运行结果 Array ( [0] => getMobileCodeInfoResponse getMobileCodeInfo(getMobileCodeInfo $parameters) [1] => getDatabaseInfoResponse getDatabaseInfo(getDatabaseInfo $parameters) [2] => getMobileCodeInfoResponse getMobileCodeInfo(getMobileCodeInfo $parameters) [3] => getDatabaseInfoResponse getDatabaseInfo(getDatabaseInfo $parameters) ) */ /* print_r( $soapclient -> getMobileCodeInfo(array('mobileCode'=>18790529086))); 运行结果: stdClass Object ( [getMobileCodeInfoResult] => 18790529086:河南 新乡 河南移动全球通卡 ) */
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。