The foreign trade station does not want to allow access from mainland China. it wants to use JavaScript to detect that the browser language is blocked in Chinese, but it will mistakenly hurt many overseas Chinese. In addition, according to statistics, there are still many overseas Chinese websites, how can I solve this problem if I use backend PHP to determine whether to search for the Chinese mainland for half a day? Before and after... the foreign trade station does not want to allow access from mainland China. it wants to use JavaScript to detect that the browser language is blocked in Chinese, but it will mistakenly hurt many overseas Chinese. In addition, according to statistics, there are still many overseas Chinese websites, how can I solve this problem if I use backend PHP to determine whether to search for the Chinese mainland for half a day? Both frontend and backend
Reply content:
The foreign trade station does not want to allow access from mainland China. it wants to use JavaScript to detect that the browser language is blocked in Chinese, but it will mistakenly hurt many overseas Chinese. In addition, according to statistics, there are still many overseas Chinese websites, how can I solve this problem if I use backend PHP to determine whether to search for the Chinese mainland for half a day? Both frontend and backend
To shield IP addresses, you need to find IP addresses in mainland China. While the Asia Pacific region IP is the responsibility of the APNIC, you can download: http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest
Then, find the IP address in mainland China based on the country code "CN.
You can execute the following in shell:
Wget http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latestgrep ipv4 delegated-apnic-latest | grep CN | awk-f' | ''{print $4 }'
The output is the IP address of the Chinese mainland.
How do you shield me from the wall ......
PS: I don't want them to see how unrealistic they are, so I don't want them to buy it, for example, ban's registered email address, mobile phone number, and mailing address.
Check the access IP address. if it is a domestic IP address, it will be blocked.