http://www.ayandy.com/Service.asmx?op=getWeatherbyCityName这个是个免费获取天气的webservice我用Soap来获取。
例如,下面的代码:$client = new SoapClient("http://www.ayandy.com/Service.asmx?wsdl");
print_r($client);
$rs = $client->__Call('getWeatherbyCityName',array('parameters'=>array(
'theCityName' => '上海',
'theDayFlag' => 'today',
)));print_r($rs);
却返回错误的信息.哪位高手,帮我看看 http://www.ayandy.com/Service.asmx?op=getWeatherbyCityName,然后用 $client = new SoapClient
....这种方法帮我获取一下天气。谢谢了!
例如,下面的代码:$client = new SoapClient("http://www.ayandy.com/Service.asmx?wsdl");
print_r($client);
$rs = $client->__Call('getWeatherbyCityName',array('parameters'=>array(
'theCityName' => '上海',
'theDayFlag' => 'today',
)));print_r($rs);
却返回错误的信息.哪位高手,帮我看看 http://www.ayandy.com/Service.asmx?op=getWeatherbyCityName,然后用 $client = new SoapClient
....这种方法帮我获取一下天气。谢谢了!
print_r($client);
$rs = $client->__Call('getWeatherbyCityName',array('parameters'=>array(
'theCityName' => '上海',
'theDayFlag' => 'Today', #Today,not today,wb说明里有写发送参数.'Today or Tomorrow or theDayafterTomorrow'
)));print_r($rs);