Until now i used cookies and the code is the following.
The problem with using cookies is they are stored or accepted at the suffrage of the end user. If a browser has cookies turned off then no cookie. If the user clears the
cookies out of their browser, no cookie. (bad dog... no
cookie)
As borisz pointed out very well, the alternative is to
set up some sort of authentication for the web page and
logging login sessions.
There are two probelems with logging IP addresses:
- NAT will mask the true IP address of a client. If they
are coming from a major college campus or large business
multiple people from the same institution are going to have
the same IP address. How do you tell Sam from Sally in
that case?
-
Most folks have dynamic IP addresses. If they connect
to their ISP today they might get a different IP
address tomorrow.
Even setting up authentication is not 100% fool proof
OBTW. There is nothing preventing an authenticated user
from posting the account credentials to a newsgroup or
bulletin board and 100 people using that token. It happens
(allegedly) with pr0n sites all the time.
There are stronger ways of ensuring non-repudiation, but
that IMHO is beyond the scope of this discussion and
besides I haven't had my coffee yet and I'm too lazy to
go into all of that right now. :-)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.