时间:2021-07-01 10:21:17 帮助过:13人阅读
$client = new soapclient('http://www.tuc365.cn/SPINTERFACE.asmx?wsdl', true);
$fromcity=$_POST[txtCity]; //出发城市
$tocity=$_POST[txtCity0]; //抵达城市
$fromdate=$_POST[fromdate]; //出发时间
$roles=$_POST[roles]; //是否返回
$returnDate=$_POST[returnDate]; //返回时间
$userName=$_POST[username]; //用户名
$clientName=$_POST[clientName]; //乘客姓名
$clientCardId=$_POST[clientCardid]; //乘客证件号
$clientPhone=$_POST[clientPhone]; //乘客电话
$clientType=$_POST[clientType]; //乘客类型
$webname="51pingo.com"; //网站名称
$filghtId=$_POST[$filghtId]; //航班id
$linkName=$_POST[txtLinkManName]; //联系人姓名
$linkPhone=$_POST[txtLinkManPhone]; //联系人电话
$linkAddress=$_POST[txtLinkManAddress]; //联系人电话
$linkEmail=$_POST[txtLinkManEmail]; //联系人email
$webOrderId=date("YmdHis"); //生成订单号
$webUserName="tuc365";
$webmd5="tuc365";
$orderInfo=array($fromcity,$tocity,$fromdate,$roles,$returnDate,$userName,$clientName,$clientCardId,$clientPhone,$clientType,$webname,$filghtId,$linkName,$linkPhone,$linkAddress,$linkEmail,$webOrderId,$webUserName,$webmd5);
$str=$client->call('AddOrders',$orderInfo);
if (!$err=$client->getError()) {
echo "程序返回:",htmlentities($str,ENT_QUOTES);
} else {
echo "错误 :",htmlentities($err,ENT_QUOTES);
}
header("Content-Type: text/html;charset=utf-8");
$client = new SoapClient('http://www.tuc365.cn/SPINTERFACE.asmx?wsdl');
//GetFlight
$aData = array('webName'=>'','webUserName'=>'','webmd5'=>'tuc365');
$aResult = $client->__call('GetFlight',$aData);
//AddOrders
/*$aData = array(
"fromCity"=>"",
"toCity"=>"",
"fromDate"=>"",
"returnDate"=>"",
"roles"=>"",
"userName"=>"",
"clientName"=>"",
"clientCardId"=>"",
"clientPhone"=>"",
"clientType"=>"",
"webName"=>"",
"flightId"=>"",
"linkName"=>"",
"linkPhone"=>"",
"linkAddress"=>"",