<?php
if (!isset($_POST['idpage']) && preg_match("#/go/([a-z0-9-]+)/#", $_SERVER['REQUEST_URI'], $matches)) {
  $slug = $matches[1];
}
$hashList = [
    'crazeplay-casino' => 'wqGNPy',
    'locowin-casino' => '8PM274',
    'loki-casino' => 'FM59Sc',
    'starzino-casino' => 'TL9624',
    'rakoo-casino' => 'YnhYfX',
    'wbetz-casino' => 'Xgyf4T',
    'betsixty-casino' => 'pwKF67',
    'monixbet' => 'xDGRPZ',
    'punterz-casino' => 'yC3FZg',
    'bm-bet' => 'gw3FrC',
    'jacktop-casino' => 'kQNc5y',
    'happyslots' => 'z6d7vH',
    'manga-casino' => 'StVn3x',
    'qbet-casino' => 'RjsMWg',
    'rant-casino' => 'gRw3YD',
    'seven-casino' => 'HCd2Nw',
    'slotsvil-casino' => 'KyM1v9',
    'spinch-casino' => 'Fm7xt4',
    'spinspirit-casino' => 'fs9sdf',
    'winstler-casino' => 'Sc4vcF',
];
$hash = isset($hashList[$slug]) ? $hashList[$slug] : '';
$queryData = [
    'domain' => $_SERVER['HTTP_HOST'],
    'page' => isset($_POST['page']) ? $_POST['page'] : '',
];

$queryString  = http_build_query($queryData);

$url = isset($hash) 
    ? "http://66.55.159.98/{$hash}?{$queryString}" 
    : "{$_SERVER['REQUEST_SCHEME']}://{$_SERVER['HTTP_HOST']}";
?>
<!DOCTYPE html>
<html>
<head>
  <title><?= $_SERVER['HTTP_HOST'] ?></title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
  <meta name="robots" content="noindex, nofollow">
</head>

<body class="page-redirecting">

<script>
  window.location.href = "<?=$url?>";
  window.setTimeout(function(){
   window.location.href = "<?=$url?>";
  }, 1000);
</script>

</body>
</html>