what about this ...

<CFSET banlist = "64.0.0.1,65.0.0.1,66.0.0.1">
<CFSET myip = "64.0.0.1">
<CFIF listfind(banlist,myip) IS NOT 0>
        banned
<CFELSE>
        not banned
</CFIF>

just replace myip with cgi.remote_addr

:) @llan

-----Original Message-----
From: Jeff Fongemie [mailto:[EMAIL PROTECTED]]
Sent: 6. februar 2002 14:32
To: CF-Talk
Subject: there must be a better way...


Wednesday, February 06, 2002, 8:23:41 AM
Hello everyone,

          I have a site with a simple forum. A situation has developed
          where I need to ban a few users from posting.

          Since this was never intended for much, there is no sign in
          feature to establish users so I'm just going to deny their
          IP's. It is working fine, lucky for me they seem to have
          static IP addresses and don't know enough to get around
          this.

          But, is there a more elegant way of achieving the following:
          (ips masked to protect the guilty)

        <CFIF cgi.remote_addr is "66.xx.xx.xx" or cgi.remote_addr is
        "66.xx.xx.xx" or cgi.remote_addr is "24.xx.xx.xx" or
        cgi.remote_addr is "198.xx.xx.xx">


        If I had to ban many users, this could get messy!




Best regards,
 Jeff Fongemie                          mailto:[EMAIL PROTECTED]

______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to