'getFullProfile', 'api_key' => 'demo', 'url_name' => $ids[0], 'response' => 'all' ); $request = new RestRequest('http://api.lunchgate.ch/1_0/', 'GET', $params); $request->setAcceptType('xml'); $request->execute(); $result = new SimpleXMLElement($request->getResponseBody()); if(isset($result -> uid))$ids[0]= (int)$result -> uid; else header('Location: '.'/search'); } unset($_SESSION['ids']); unset($_SESSION['position']); $_SESSION['ids'] = $ids; $_SESSION['position'] =0; if(isset($_GET['menu']))$showMenu=$_GET['menu']; else $showMenu=1; unset($_SESSION['showMenu']); $_SESSION['showMenu'] = $showMenu; $profile_params = array( 'action' => 'getRestaurantList', 'api_key' => 'demo', 'ids' => implode(',',$ids), 'response' => 'all' ); $profile_request = new RestRequest('http://api.lunchgate.ch/1_0/', 'GET', $profile_params); $profile_request->setAcceptType('xml'); $profile_request->execute(); $profile = new SimpleXMLElement($profile_request->getResponseBody()); $names=array(); $tmp=array(); $rid=array(); foreach ($profile -> restaurants -> children() as $m){ array_push($rid,$m -> id); array_push($tmp,$m -> real_name); } foreach ($ids as $id){ $key=array_search($id,$rid); array_push($names,$tmp[$key]); } $_SESSION['names'] = implode(',',$names); ?> Panorama-Tour | Lunchgate.ch