I've got a file on my centos box (var/lib/webalizer/webalizer.hist) that contains the following data
1 2008 34761 28429 4084 602802 1 31 11953 4100
2 2008 30260 26357 2524 946628 1 29 10519 3583
3 2008 60366 53570 3529 2337832 1 31 18149 7375
4 2008 51558 46152 3216 1078036 1 30 17895 7816
5 2008 53368 37689 2691 934830 1 31 28372 6324
6 2008 35208 23378 2454 428751 1 30 20057 6452
7 2008 28908 20103 1633 407008 1 31 12240 5204
8 2008 74651 58464 1449 755570 1 31 20464 5290
9 2008 50860 42680 1487 651686 1 30 15285 6098
10 2008 33675 26966 1418 556143 1 31 14719 6177
11 2008 17088 14320 730 247092 1 13 8636 2615
12 2007 36010 29503 6964 8716984 1 31 10685 4424
The first number on each line is the month, so for example the line beginning with
11, is the month of November. The next number to the right of
11 is how many hits my website has had that month, for example, in November so far, I've had
17088 hits.
I'd like to write a little script which can pull the number of hits out for the current month, and then display this number on my homepage. Any ideas?
Cheers
Ryan Partington
