September 4, 2020 at 08:46PM

● I noticed that many genuine visitors of get flagged as red by the code I had added a year ago.

I have modified the code now.

Following was the buggy code:

$portnumbers = array(80,81,553,554,1080,3128,4480,6588,8000,8080,8443);

foreach ($portnumberss as $singleport) {
if (@fsockopen($_SERVER['REMOTE_ADDR'], $singleport, $errno, $errstr, 0.9)) {

Those who didn't get this fully:
The code takes all the port numbers mentioned in the array and scans the IP of the page visitor. If any of the ports are open, the flag $UI is set red and later in the code all red(s) are redirected.

This code was supposed to detect web based proxies. Not only it could easily be bypassed but caused genuine visitors to be blocked.

I won't be sharing the real / new code for security reasons but that may allow some proxy users while keeping all genuine users happy.

I thought of sharing this code as some of you may use it as such.