<?php
if (!isset($_GET['url'])) {
        header("location:https://aiaiv.cn");
        exit;
}
$url=preg_replace('/[ \']/', '', strip_tags(str_replace("\r\n", "", trim($_GET['url']))));
$fu=strstr($url,"103.176.197.5");
if ($fu!="") {
	header("location:https://aiaiv.cn");
	exit;
}
$u1=explode(":",$url);
//print_r($u1);
if (count($u1)>=3) {
	header("location:https://aiaiv.cn/?dk=p");
	exit;
}
$fu=strstr($url,".xyz");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=xyz");
	exit;
}
$fu=strstr($url,".today");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=tody");
	exit;
}
$fu=strstr($url,".shop");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=shop");
	exit;
}
$fu=strstr($url,".top");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=top");
	exit;
}
$fu=strstr($url,".cyou");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=cyou");
	exit;
}
$fu=strstr($url,".cc");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=cc");
	exit;
}
$fu=strstr($url,".club");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=club");
	exit;
}
$fu=strstr($url,".bar");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=bar");
	exit;
}
$fu=strstr($url,".pro");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=pro");
	exit;
}
$fu=strstr($url,".live");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=live");
	exit;
}
$fu=strstr($url,".fun");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=fun");
	exit;
}
$fu=strstr($url,"btxun.com");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=btxun");
	exit;
}
$fu=strstr($url,"vwaf.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=vwaf");
	exit;
}
$fu=strstr($url,"aiwaf.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=aiwaf");
	exit;
}
$fu=strstr($url,"zytong.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=zytong");
	exit;
}
$fu=strstr($url,"zynhx.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=zynhx");
	exit;
}
$fu=strstr($url,"/attached/");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=attached");
	exit;
}
/*
$fu=strstr($url,"rpatu.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=rpatu");
	exit;
}
$fu=strstr($url,"rpatu.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=rpatu");
	exit;
}
$fu=strstr($url,"rpatu.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=rpatu");
	exit;
}
$fu=strstr($url,"rpatu.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=rpatu");
	exit;
}
$fu=strstr($url,"rpatu.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=rpatu");
	exit;
}
*/
$fu=strstr($url,"rpatu.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=rpatu");
	exit;
}
$fu=strstr($url,"rpayi.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=rpayi");
	exit;
}
$fu=strstr($url,"rpatu.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=rpatu");
	exit;
}
$fu=strstr($url,"fussl.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=fussl");
	exit;
}
$fu=strstr($url,"ybke.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=ybke");
	exit;
}
$fu=strstr($url,"qicp.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=qicp");
	exit;
}
$fu=strstr($url,"softwo.cn");
if ($fu!="") {
	header("location:https://aiaiv.cn/?dk=softwo");
	exit;
}
#preg_match_all('#(http://rpatu.cn|http://rpayi.cn)#',$url,$res);
#if (strlen($res)>0) {
#	header("location:https://aiaiv.cn");
#	exit;
#}
if (substr($url,0,4)!="http") {
         header('HTTP/1.1 404 Not Found');
         header("status: 404 Not Found");
}else{
        header("location:$url");
}
?>

