Message 1 of 11
Reading data from txt file II: Log files

Not applicable
10-09-2008
07:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I typically waste 2-3 days trying to figure something out before asking for help (I should rethink this...)...
I'm beginning a project to visualize webpage logs. First up: IP addresses.
I read in a line from the log which gives me an array of an IP address where:
ip = "1"
ip = "3"
ip = "0"
ip = "."
and so on to include all 4 octets of the IP address.
I'm looking along the lines of
for i in 1 to ip.count do...
Goals:
- create an array of unique IPs (i.e. prune off all duplicates)
- can you create an array of arrays? i.e. an array where ArrayA = (130, 203, 135, 83), ArrayA = (66, 249, 72, 196), etc.
- create an array where Array = (130, 203, 135, 83, X, T) where X was the number of duplicates and T is the time the webpage was viewed (which is a field in the log)
There's more, but I'm hoping if I get up to speed w/ these, I can slog on my own from there.
I'm beginning a project to visualize webpage logs. First up: IP addresses.
I read in a line from the log which gives me an array of an IP address where:
ip = "1"
ip = "3"
ip = "0"
ip = "."
and so on to include all 4 octets of the IP address.
I'm looking along the lines of
for i in 1 to ip.count do...
Goals:
- create an array of unique IPs (i.e. prune off all duplicates)
- can you create an array of arrays? i.e. an array where ArrayA = (130, 203, 135, 83), ArrayA = (66, 249, 72, 196), etc.
- create an array where Array = (130, 203, 135, 83, X, T) where X was the number of duplicates and T is the time the webpage was viewed (which is a field in the log)
There's more, but I'm hoping if I get up to speed w/ these, I can slog on my own from there.