0

I create website using php. and then I want to block VPN IP ADDRESS or hide ip Program. in my login. I see ebay.com website can block VPN IP ADDRESS or hide ip Program.

How do write script php for block VPN IP ADDRESS or hide ip Program.

Gaurav Dave
  • 6,838
  • 9
  • 25
  • 39
  • Have you tried this : http://stackoverflow.com/questions/858357/detect-clients-with-proxy-servers-via-php ? The moment you can detect it, you can also block it – Cr3aHal0 May 15 '15 at 09:24

1 Answers1

0

It's simple to implement:

if (in_array($_SERVER['REMOTE_ADDR'], $blocked_ips)) die("Go away!");

... but it requires a list of IPs you'd like to block. IP hiding works by using a proxy. There is no way to detect if a user is hiding their IP besides checking if traffic is coming from a known IP hiding service's IP. Where you might find such a list, I don't know, but that's the only way to go about this.

Schlaus
  • 18,144
  • 10
  • 36
  • 64