Tag:php webservice ticket flight schedule
<?phpheader (' content-type:text/html; Charset=utf-8 '); $client = new SoapClient (' http://webservice.webxml.com.cn/ Webservices/domesticairline.asmx?wsdl '); $fromcity =!empty ($_post[' fromcity ')? Trim ($_post[' fromcity '): ' Changsha '; $tocity =!empty ($_post[' tocity '])? Trim ($_post[' tocity '): ' Guangzhou '; $date =!empty ($_post[' date ')? Trim ($_post[' date '): Date (' y-m-d ', Time ()), $parm =array (' startcity ' = $fromcity, ' lastcity ' = $tocity, ' Thedate ' + $date, ' userID ' = '), $city = $client->getdomesticcity (); $city =get_object_vars ($city); $city = $city [' Getdomesticcityresult ']->any;//print_r ($city);//var_dump ($city); $city _xml = Simplexml_load_ String ($city); $result = $client->getdomesticairlinestime ($parm); $result =get_object_vars ($result); $result = $result [' Getdomesticairlinestimeresult ']->any;//print_r ($result [' Getdomesticairlinestimeresult ']- >any); $obj _xml = simplexml_load_string ($result); Print_r ($obj _xml->children ()->children ()); ? ><! DOCTYPE HTML PUBLIC "-//w3c//dtd XHTML 1.0 transitional//en "" Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">