title: Ways of banning someone from a website
body: <p>I want to ban someone from my website.</p>
  
  <p>So far, here's what I tried:</p>
  
  <ul>
  <li><p>If someone with an IP that contained for example "188.91.1.x" entered my website, I would <code>die()</code> the site.</p></li>
  <li><p>Cookies</p></li>
  </ul>
  
  <p>The user I am trying to ban went around the above steps I've taken.</p>
  
  <p>There are public chatrooms on my website and I want to keep him out of it. </p>
  
  <p>How would you guys keep this person banned?</p>
  
  <p>Any way to get any other unique ID specific to the user's machine, or even browser?</p>
  
  <p>Ps: </p>
  
  <ul>
  <li><p>I can't ban by login name (tried it, he keeps creating a new account)</p></li>
  <li><p>I can't white list, kind of for the same reason as the above.</p></li>
  </ul>
  
  <p>Edit:</p>
  
  <p>I found this code and it works when testing with HideMyAss.com</p>
  
  <pre><code>&lt;?
  if( @fsockopen( $_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1 ) )
  {
      die("I'm not letting you in");
  }
  else
  {
  ?&gt;
  Hello normal user, thanks for not trying to use a proxy
  &lt;?
  }
  ?&gt;
  </code></pre>
  
  <p>Anything that could go wrong with it (even if just to try it out in production)?</p>
  
  <p>Well, the fsockopen way seems to be only for web-based proxies (which is perfect as I believe he's using it). I will first count how many visitors I get which trigger the fsockopen code I've pasted in my post and see if appropriate for me to use as a next step towards success of banning that person.</p>