'login', 'pass'=>'password' ); // parameters to check availability $params = array( 'ofr_tourOp'=>'ITAK', 'ofr_id'=>'3b9e9af3bea2b7e822df6805066de0cbc501a337f843d85689f84b47ac86e1f2', 'par_adt'=>'2' ); $mdsws = new mdswsBookings(); $rqxml = $mdsws->genXMLRQ($auth, 'check', $params); $check_res_xml = $mdsws->sendXML($rqxml); $check_res = simplexml_load_string($check_res_xml); if (isset($check_res->offerstatus) && isset($check_res->offerstatus->attributes()->status) && $check_res->offerstatus->attributes()->status == 'BA') { echo "Oferta dostępna! \n"; echo "Cena całkowita : ".$check_res->pricetotal->attributes()->price.' '.$check_res->pricetotal->attributes()->curr."\n"; echo "Cena za os. : ".$check_res->priceperson->attributes()->price.' '.$check_res->priceperson->attributes()->curr."\n"; if (isset($check_res->hints)) { echo "Info od organizatora: \n\n"; foreach ($check_res->hints->children() as $hint) echo $hint."\n"; } } else echo 'Oferta niedostępna!'; // DEBUG //echo "\n\n".print_r($check_res,true); ?>