Page 1 of 1

Regex for site visits -> logs

Posted: Thu Feb 10, 2005 1:57 pm
by mjseaden
Hi,

Can anyone tell me of a regex() that will determine the number of unique visitors to a site from standard apache log files?

I appreciate this will likely have to be a regex/PHP combo, but I really need help with the regex(). If anyone can refer me to any relevant material (a straight regex with explanation would be REALLY helpful) I'd be grateful.

Many thanks

Mark

Posted: Thu Feb 10, 2005 4:27 pm
by djot
-
Hi,

As far as I know a regular expression won't help you here.
You may parse each row of the log with that, but for sure not have a complex counter program out of only one regex.

djot
-

Posted: Thu Feb 10, 2005 4:46 pm
by d3ad1ysp0rk
PLEASE. DON'T. DOUBLE. POST.

viewtopic.php?p=157500&highlight=#157500

Posted: Fri Feb 11, 2005 5:39 am
by mjseaden
Hi Guys

Apologies for the double post - I accidently post initially to the wrong forum (general discussion).

I think it's a good question on the other thread exactly what is meant by 'unique visits'. Would it be a reasonable definition to say those coming from unique IPs?

Cheers

Mark

Posted: Fri Feb 11, 2005 5:52 am
by Maugrim_The_Reaper
Unique IPs != Unique Visitors :)

Users may share IPs from sharing a similar or same connection. For example networked pcs, and even ISPs. Reminds me of the case where two users had the same IP - we were scanning for multiple accounts on a game server. Both people turned out to be several states apart (US), but used the same ISP.

I agree it's a very rough guide - but it's not exact. There's exceptions to the rule. One of the reasons I only use IP banning in extreme cases...