Error: 28: Timeout was reached: Operation timed out after 30000 milliseconds with 0 bytes received
<div class="breadcrumb-content"> <div class="section-heading"> <div class="left-side-info rtl-align-right" style="color:#fff"> <span> <strong style="text-transform: capitalize"> <h2 class="sec__title_list"><?php if(isset($_SESSION['flights_origin'])){ echo strtoupper($_SESSION['flights_origin']); } else {} ?> <i class="la la-arrow-right"></i> <?php if(isset($_SESSION['flights_destination'])){ echo strtoupper($_SESSION['flights_destination']); } else {} ?></h2> </strong> </span> <div> <p><strong><?=T::dates?> </strong>( <?php if(isset($_SESSION['flights_departure_date'])){ echo $_SESSION['flights_departure_date']; } else { $d=strtotime("+3 Days"); echo date("d-m-Y", $d); } ?> <i class="la la-arrow-right"></i> <?php if(isset($_SESSION['flights_returning_date'])){ echo $_SESSION['flights_returning_date']; } else { $d=strtotime("+5 Days"); echo date("d-m-Y", $d); } ?> )</p> <p><strong><?=T::flights_adults?></strong> <?php if(isset($_SESSION['flights_adults'])){ echo $_SESSION['flights_adults']; } else { echo "1"; } ?> <strong><?=T::flights_childs?></strong> <?php if(isset($_SESSION['flights_childs'])){ echo $_SESSION['flights_childs']; } else { echo "0"; } ?> <strong><?=T::flights_infants?></strong> <?php if(isset($_SESSION['flights_infants'])){ echo $_SESSION['flights_infants']; } else { echo "0"; } ?></p> </div> </div> </div> </div> </div> <div class="col-lg-6"> <div class="breadcrumb-list"> <ul class="list-items d-flex justify-content-end"> <li><a href="javascript:void(0)"><?=T::flights_total_flights?> <?= count($flights_data); ?></a></li> </ul> </div> </div> </div> </div> </div> <!-- end breadcrumb-wrap --> <!-- <div class="bread-svg-box"> <svg class="bread-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10" preserveAspectRatio="none"> <polygon points="100 0 50 10 0 0 0 10 100 10"></polygon> </svg> </div>--> <!-- end bread-svg --> </section> <div class="modify_search"> <div class="container"> <?php include 'search.php';?> </div> </div> <?php if ( empty($flights_data) ) { ?>
<?php include "header.php"; ?> <?php include $body; ?> <?php include "footer.php"; ?>
} if(!isJSON($string)){ $flights_data = $string; } // dd($flights_data); // die; // echo "<pre>"; // print_r($flights_data); // exit(); }; // generate logs logs($SearchType = "Flights Search"); // adding search to session SEARCH_SESSION($MODULE=T::flights_flights,$CITY=strtoupper($url[3])."<i class='la la-arrow-right px-1'></i>".strtoupper($url[4])); $body = views."modules/flights/listing.php"; include layout; }); $router->post('flights/booking', function() { $title = "Flight Booking"; $meta_title = "Flight Booking"; $meta_appname = "Flight Booking"; $meta_desc = ""; $meta_img = ""; $meta_url = ""; $meta_author = ""; $meta = "1"; // user session check if (isset($_SESSION['user_login']) == true) { $req = new Curl(); $req->post(api_url . 'api/login/get_profile?appKey=' . api_key, array('id' => $_SESSION['user_id'], )); $profile = json_decode($req->response); $profile_data = $profile->response; // dd($profile_data);
} else { throw new InvalidArgumentException('Route/error callable as string must not be empty.'); } $callable = str_replace('.', '\\', $callable); } if (is_array($callable)) { if (count($callable) !== 2) throw new InvalidArgumentException('Route/error callable as array must contain and contain only two strings.'); if (strlen($callable[0]) > 0) { if ($callable[0][0] == '@') { $callable[0] = $this->baseNamespace . substr($callable[0], 1); } } else { throw new InvalidArgumentException('Route/error callable as array must contain and contain only two strings.'); } $callable[0] = str_replace('.', '\\', $callable[0]); } // Call the callable return call_user_func_array($callable, $params); } /** * Dispatches the router using data from the $_SERVER global * * @return mixed Router output */ public function dispatchGlobal() { $pos = strpos($_SERVER['REQUEST_URI'], '?'); return $this->dispatch( $_SERVER['REQUEST_METHOD'], '/'. trim( substr($pos !== false ? substr($_SERVER['REQUEST_URI'], 0, $pos) : $_SERVER['REQUEST_URI'], strlen(implode('/', array_slice(explode('/', $_SERVER['SCRIPT_NAME']), 0, -1)) .'/')), '/' ) );
$service = isset($route[1]) ? $route[1] : null; // Fix missing begin-/ if ($regex[0] != '/') $regex = '/' . $regex; // Fix trailing / if ($len > 1 && $regex[$len - 1] == '/') $regex = substr($regex, 0, -1); // Prevent @ collision $regex = str_replace('@', '\\@', $regex); // If the path matches the pattern if (preg_match('@^' . $regex . '$@', $path, $params)) { // Pass the params to the callback, without the full url array_shift($params); try { return $this->call($callback, $service == null ? $params : array_merge([$service], $params)); } catch (HttpRequestException $ex) { $params = [$method, $path, $ex->getCode(), $ex]; return $this->call($this->error, $this->service == null ? $params : array_merge([$this->service], $params)); } catch (Exception $ex) { $params = [$method, $path, 500, $ex]; return $this->call($this->error, $this->service == null ? $params : array_merge([$this->service], $params)); } } } } } // Nothing found --> error handler return $this->call($this->error, array_merge($this->service == null ? [] : [$this->service], [$method, $path, 404, new HttpRequestException(self::NO_ROUTE_FOUND_MSG)])); } /** * Internal function to parse and call custom callables *
// Call the callable return call_user_func_array($callable, $params); } /** * Dispatches the router using data from the $_SERVER global * * @return mixed Router output */ public function dispatchGlobal() { $pos = strpos($_SERVER['REQUEST_URI'], '?'); return $this->dispatch( $_SERVER['REQUEST_METHOD'], '/'. trim( substr($pos !== false ? substr($_SERVER['REQUEST_URI'], 0, $pos) : $_SERVER['REQUEST_URI'], strlen(implode('/', array_slice(explode('/', $_SERVER['SCRIPT_NAME']), 0, -1)) .'/')), '/' ) ); } } class HttpRequestException extends Exception { }
echo $_SESSION['session_currency'] = $c; header("Location: ".root); }); } } // STORE LOGS TO LOGGING FILE function logs($SearchType){ $log = "IP: ".$_SERVER['REMOTE_ADDR'].' - '.date("F j, Y, g:i a"). '- Type => '.$SearchType . ' - URL => ' .$_GET['url'].PHP_EOL. "------------------------------------".PHP_EOL; $logs_path = "app/logs"; if (!file_exists($logs_path)) { mkdir("app/logs", 0777); } else { }; file_put_contents('app/logs/log_'.date("j.n.Y").'.log', $log, FILE_APPEND); }; // STORE SEARCHS TO SESSION function SEARCH_SESSION($MODULE,$CITY){ $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $b_=(object)array($MODULE,$CITY,$actual_link); if (isset($_SESSION['SEARCHES'])){} else { $_SESSION['SEARCHES'] = array(); } array_push($_SESSION['SEARCHES'],$b_); }; // $router->get('/page/(.*)', ['PageController', 'viewPage']); // $router->route(['OPTION', 'PUT'], '/test', 'PageController::test'); $router->dispatchGlobal(); ?>