Forum Moderators: mack
when I visit some sites that I am a member of, like WW, I am automatically logged in as me.
How do I go about setting this up on my site?
It's just that I want my logs to show my name when I look at my own site so I can see how often I visit and how often other are. (I have dynamic IP so I can't track that)
I don't have any login facilities on my site as yet (and not really planning to) so if there is an alternate (easier) way of sorting me from *REAL* visitors then that would be great too.
Thanks
Kenton
What I do is have software running on a local server that keeps track of my IP Address and has DynDNS update their records when my IP Address changes. That way I can use a domain name with a dynamic IP Address. Anyway, at the end of the week I extract the list of IP Addresses I've used that week and run a script on the log files from all my websites that creates new log files without my IP Addresses in them. At this point I now have two logs. One is pure. The other shows everyone except me.
How do I go about setting this up on my site?
It's all done with cookies. When a user is logged in, a cookie is stored on their computer. That cookie's token and a value is recorded in a database.
Whenever you come back, the site looks for that cookie, and checks its token value. If it matches a token value in the database, it knows who you are.
It's fairly trivial to set up, if you've already got a dynamic site and database.