[ic] IP Logging

Andrew McBeath interchange-users@icdevgroup.org
Sun Jul 7 21:53:00 2002


> I'd like to prohibit the same user from creating 2 accounts.  Here is a
> thought but if someone can advise the easiest way to do this, I'd appreciate
> it.
> 
> I'd like to create a table that contains the IP address of all user accounts
> (the data in this table will not be removed if the account is).  I would
> then like new_account to value check the current IP Address against all that
> are in that table.
> 
> Current IP Address DOES NOT EXIST:
> Proceed with account creation.
> 
> Current IP Address DOES EXIST (bounce to another page or display):
> "We're sorry, we don't allow multiple accounts" or something to that effect.
> 
> Is this possible?  If so, how can I obtain the IP address of a current user.
> Once I obtain it, how can I get it into a value of some sort in order to be
> written to the database?
> 

Yes, this is completely possible, but this is not a very good idea:

Most ISP's use dynamic IP's, so you cannot reliably identify somebody as
a repeat user based on their IP address.  They can come back with
another IP, and another person can come back with the first person's IP.

If you want to do this, you'll find cookies to be a lot more reliable to
you...but they can be deleted off the user's machine, of course...

Kind regards,


-- 
Andrew McBeath
System Admin / Senior Developer
Zeald Ltd
ICQ: 53879543
Ph: +64 9 4157575
Mob: +64 21 434104

-------
Maybe in order to understand mankind, we have to look at the
word itself: "Mankind".
Basically, it's made up of two separate words - "mank" and "ind".

What do these words mean?
It's a mystery, and that's why so is mankind.

Jack Handy
-------