使用php在API中调用请求
我试图使用下面的方法调用API中的函数,但我不确定我做错了什么使用php在API中调用请求,php,api,soap,soap-client,Php,Api,Soap,Soap Client,我试图使用下面的方法调用API中的函数,但我不确定我做错了什么 $wcfClient = new SoapClient('http://apisite.com/FlighSearch.svc?wsdl'); $postData=array( 'username'=>'username', 'password'=>'password' ); $response = $wcfClient->UserAuthentication($postData); echo $response-
$wcfClient = new SoapClient('http://apisite.com/FlighSearch.svc?wsdl');
$postData=array(
'username'=>'username',
'password'=>'password'
);
$response = $wcfClient->UserAuthentication($postData);
echo $response->UserAuthenticationResult;
我得到的结果是:
认证成功
它的平均API连接正常。现在我这样调用函数:
$response_final = $wcfClient->SearchFareReturnFlight('U',"5HB","12/12/2015","12/30/2015",1,"LHR","HKG","username","password");
echo $response_final
但是它对我不起作用。你能检查一下有什么问题吗