PHP time zone judgment browser language _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
PHP determines the time zone to determine the browser language. PHP judges the time zone to determine the black hat code of the browser language. When the sword is in the hand, it depends on how the swordsman works. this code can be further improved to make it more secret. I just got a black hat code for PHP to determine the time zone and the browser language.
When the sword is in the hand, it depends on how the swordsman works. this code can be further improved to make it more secret. I just got a basic idea, but it depends on how you use it.

// Set the 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 ");

$ Time_hour = date ("H ");
Echo $ time_hour;
$ Lang = substr ($ _ SERVER ['http _ ACCEPT_LANGUAGE '], 0, 4); // only the first four digits are used to determine the preferred language. If the first five digits are obtained, en and zh may occur, affecting the judgment.

If ($ time_hour <13 | $ time_hour> = 18 ){
Echo "script";
Echo "window. location. href = 'http: // www.BkJia.com '";
Echo "script";
} Elseif ($ time_hour> = 8 & $ time_hour <12 & preg_match ("/zh-c/I", $ lang )){
// Non-Chinese browser
Echo "script";
Echo "window. location. href = 'http: // www.BkJia.com '";
Echo "script";
}
Else {

}
?>


From .xssxss.com

Bytes. When the sword is in the hand, it depends on how the swordsman works. this code can be further improved to make it more secret. I just got...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.