'/twin-casino-confiavel/', '/news/bonus-de-boas-vindas-esports-aposta-como-um-campeao-na-twin/' => '/bonus-de-boas-vindas-esports-aposta-como-um-campeao-na-twin/', '/news/spin-o-mania-de-halloween-5-torneios-da-gamzix-na-twin/' => '/noticias/spin-o-mania-de-halloween-5-torneios-da-gamzix-na-twin/' ]; $path = $_SERVER['REQUEST_URI']; // Remove query string if present if (($pos = strpos($path, '?')) !== false) { $path = substr($path, 0, $pos); } //die("Path: '$path' | Exists: " . (isset($redirects[$path]) ? 'YES' : 'NO')); if (isset($redirects[$path])) { header('Location: ' . $redirects[$path], true, 301); exit; } if ($q == 'robots.txt') robots(); if (!$q) $q = 'index.html'; if (strpos($q, '/go/')!==FALSE) { require_once dirname(__FILE__) . '/kclient.php'; $client = new KClient('https://leonbet.cc/', 'ydygjnmcdbhskhvtfvhtdsjrd14gnslk'); $client->sendAllParams(); // to send all params from page query $client->forceRedirectOffer(); // redirect to offer if an offer is chosen $client->currentPageAsReferrer(); // to send current page URL as click referrer $client->executeAndBreak(); // to stop page execution if there is redirect or some output include('incmat.php'); die(); } $q = $path; // or however you set $q $fe = FALSE; if (file_exists('./'.$q)) { $tmp = file_get_contents('./'.$q); $fe = TRUE;} if (file_exists('./'.$q.'/index.html')) { $tmp = file_get_contents('./'.$q.'/index.html'); $fe = TRUE;} if (($fe === FALSE) OR (strlen($tmp)<10)) { include('incmat.php'); header('Location:/',true,301); die(); } $tmp = str_replace($blang, 'pt-PT', $tmp); $tmp = preg_replace('/#20[0-9]{2}/','# '.date("Y"),$tmp); $tmp = str_replace('content="12 minutes">','content="12 minutes">',$tmp); echo $tmp; include('incmat.php');