警告在php中使用SoapClient

时间:2014-12-18 08:19:26

标签: php

当我在php中使用soapclient时,会向我显示警告消息。并且网页加载很长时间。这是我的代码       

ini_set("soap.wsdl_cache_enabled", "0");
$sms_client = new SoapClient('http://87.107.121.54/post/send.asmx?wsdl', array('encoding'=>'UTF-8'));

$parameters['username'] = "demo";
$parameters['password'] = "demo";
$parameters['to'] = "912...";
$parameters['from'] = "1000..";
$parameters['text'] ="test";
$parameters['isflash'] =false;

echo $sms_client->SendSimpleSMS2($parameters)->SendSimpleSMS2Result;

?>

我检查用户名和密码,然后更正。当我运行上面的代码时,显示错误。

Warning: SoapClient::SoapClient(http://87.107.121.54/post/send.asmx?wsdl) [soapclient.soapclient]: failed to open stream: Connection timed out in /home/keyhanfa/public_html/test/test.php on line 5

Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity "http://87.107.121.54/post/send.asmx?wsdl" in /home/keyhanfa/public_html/test/test.php on line 5

0 个答案:

没有答案