php - Question: How to determine whether website visitors use proxy IP?
PHP中文网
PHP中文网 2017-05-24 11:32:34
0
2
794

The website needs to write a function to prevent proxy network access. Most of the information I found online ended in No, so I had to seek help from the experts.

The first reaction after receiving this requirement is to determine the header information. After one cigarette, there will be a lot of problems and it will not work. Now many VPNs come with the function of simulating the header information of various terminals. I am sorry, has anyone written a similar function? A friend can give me some pointers.

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
刘奇

Theoretically there is no solution.

Honest proxies will tell the target website the source IP through X-Forwarded-Forsuch a header, but there are many dishonest proxies (called anonymous or transparentproxies) who either cover up this information or make some fake ones. origin of.

So it depends on what purpose you want to prevent users from accessing. If you are just protecting the server, you can ban frequently accessed IP addresses. If you want to prevent robots from automatically obtaining information, you can block access from a certain source when you think it is frequently accessed. Skip the verification code.

If you are interested, you can search for topics like anti-crawler on the Internet.

过去多啦不再A梦

confirm("Hello visitor, honestly do you use a proxy?");
Just kidding;

Personally, I think there is no solution, otherwise why would you use a VPN, let alone a VPN with a global proxy?

Looking forward to other respondents giving better solutions.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template