views:

56

answers:

2

I've been having a spam problem on my site, where people sign up and act extremely abusive to other users of my site. I can easy IP ban them, except they always come back under a different IP address through a proxy or TOR.

So I was curious if there are any php classes or functions that can look up the IP and determine if its a genuine user, or someone behind a proxy, in which case it would muzzle their accounts upon registration.

+7  A: 

Many legitimate users will come to you through proxies - are you sure you want to filter all of them out? For example:

  • ISPs that run caching proxies for all their users
  • People on corporate networks

To answer your question, checking for the X-Forwarded-For or Via headers is probably your best bet.

RichieHindle
+1 - blocking anyone behind a proxy just seems like a really bad idea and a poor thought out solution.
rezzif
I didn't say block. It could mark them as potential spammers, and a moderator can closely examine the activities of these marked users.
Yegor
+2  A: 

Following RichieHindle's answer, I'd suggest some kind of profanity filter/detection - detect the unacceptable behaviour and suspend the accounts. Use of a proxy could definitely influence weight of decisions made by the filter/detector!

Actually stopping them is difficult, but if their nasty content doesn't get published they'll soon give up.

David Caunt
Indeed. Nothing a clbuttic profanity filter can't solve. http://stackoverflow.com/search?q=clbuttic
Frank Farmer