Tracking Users By IP Address

Michael Foord fuzzyman at gmail.com
Thu Oct 7 17:37:16 EDT 2004


Paul McNett <p at ulmcnett.com> wrote in message news:<mailman.4502.1097159793.5135.python-list at python.org>...
> Richie Hindle writes:
> 
> > [Peter]
> >
> > > If I expected many visitors
> > > from corporate environments, I'd not think this approach
> > > would have a "reasonably low margin of error".  Almost any
> > > such environment will have a firewall and masquerade
> > > multiple users as the same address.
> >
> > Some (many? all? negligibly few? I don't know) proxy
> > firewalls will tell you which internal address the request
> > came from, so you can combine the two to get a unique address
> > for that user.
> 
> I'd say "negligibly few", since there really isn't good reason 
> to give the world your internal ip address. Anyway, you can't 
> count on it, and you wouldn't have a basis to know what 
> percentage weren't unique.
> 
> Cookies won't work for you?

The sort of websites that will use this are going to be reasonably
low-traffic, 1000 hits a day or less. Bigger websites will find it
easier to generate user statistics from server logs. My script
duplicates the kind of thing thst http://www.sitemeter.com does. In
this case the margin of errror from using ip address will probably be
very low *however* cookies may still be a better solution as it would
be really nice to track who is a first time visitor and who is a
returning visitor.

This means setting cookies with a really long expire date though.....

Hmm... I think I'll just have to play around and see how they work.
Now it comes to implementing it my *real* problem is doing the data
analysis. I need a nice database engines that will answer questions
like 'how many visits from this refferer between the dates of 1st
October to the 8th of october'.....

Oh and a pure python image library would be nice !! Looks like I'll
have to hit google a bit. Thanks for your help everyone.

Regards,

Fuzzy



More information about the Python-list mailing list