How do you go about detecting a proxy and disallowing these users to register/login to your site? Thanks
It's pretty difficult to block them 100% as new ones show up every day. There are a number of real time blacklists (RBLs) available. Basically you do a quick DNS lookup of their IP address to check if they are in the RBL. An example would be TORBL http://www.ahbl.org/docs/torbl.php This RBL tracks all TOR Proxy exit nodes. Another option would be to write a basic HTML scraper to grab all the domains off proxy.org's listings. That would cover the majority of operating web proxies. The only problem with this is some of these servers might host other content.
I found this pre-written PHP script. Might be useful if you want to go the RBL route http://phprbl.init1.nl/
Found this simple script http://www.phpbuddy.com/article.php?id=22 which probably might help you. I have not tried it yet so I cannot say.
The variable that script is looking for is rarely set these days. It might detect an older squid proxy, but if someone was using PHProxy it doesn't detect it.