'https://via.placeholder.com/1200x800.png?text=Auli,+India', // Fallback 'alt' => 'A beautiful landscape of Auli, India', 'photographer' => 'N/A', 'photographer_url' => '#', ]; // Path for the cached JSON data $cache_file = __DIR__ . '/assets/cache/pexels_auli.json'; $cache_ttl = 86400; // Cache for 24 hours $image_data = null; if (file_exists($cache_file) && (time() - filemtime($cache_file)) < $cache_ttl) { $image_data = json_decode(file_get_contents($cache_file), true); } else { $url = 'https://api.pexels.com/v1/search?query=' . urlencode($destination_query) . '&orientation=landscape&per_page=1&page=1'; $api_data = pexels_get($url); if ($api_data && !empty($api_data['photos'])) { $photo = $api_data['photos'][0]; $src = $photo['src']['large2x'] ?? $photo['src']['large'] ?? $photo['src']['original']; $filename = 'pexels-' . $photo['id'] . '.jpg'; $targetDir = __DIR__ . '/assets/images/destinations/'; $targetPath = $targetDir . $filename; $localUrl = 'assets/images/destinations/' . $filename; if (!file_exists($targetPath)) { download_to($src, $targetPath); } if (file_exists($targetPath)) { $image_data = [ 'local_url' => $localUrl, 'alt' => $photo['alt'] ?? 'Image of ' . $destination_query, 'photographer' => $photo['photographer'] ?? 'Unknown', 'photographer_url' => $photo['photographer_url'] ?? '#', ]; // Cache the data if (!is_dir(dirname($cache_file))) mkdir(dirname($cache_file), 0775, true); file_put_contents($cache_file, json_encode($image_data)); } } } if ($image_data) { $destination_image = $image_data; } require_once __DIR__ . '/includes/header.php'; ?>

Plan. Share. Explore.

Your next adventure starts here. Discover, plan, and share your travels with a community of wanderers.

Explore Trips
A group of friends laughing and planning a trip together.

About TripEase

TripEase is more than just a travel app; it's a community-driven platform designed to inspire and empower travelers. From finding your next destination to planning every detail and sharing your experiences, we provide the tools you need to make every trip unforgettable.

Destination of the Month

Discover Auli, India - a Himalayan ski resort and hill station.

<?php echo htmlspecialchars($destination_image['alt']); ?>
Auli, India

With its pristine slopes and stunning mountain views, Auli is a paradise for skiers and nature lovers alike. Photo by on Pexels.

What Our Travelers Say

"TripEase made planning our group trip a breeze. The collaborative features are a game-changer!"

Jane Doe

"I love the travel style quiz! The recommendations were spot on and introduced me to places I wouldn't have found otherwise."

John Smith

"The community is so inspiring. I've discovered so many hidden gems through other travelers' stories."

Get in Touch