lol OMG are you using PHP 5.X? if so you have SQL lite. If not use a flat file system like UBB works off of. It isn't as fast as a modern db, but I seriously doubt you will generate the traffic to truely make a difference.
Like I say Ubb uses a flat file system, PHP is highly able to do this as well.
There are actually some advantages of using a flat file system also. Check it out
http://www.dummies.com/WileyCDA/DummiesArticle/id-2402.html Here are some tuts on flat file systems
http://www.tutorialized.com/tutorial/Flat-file-Shoutbox/9119 some file manipulation tuts
http://www.tutorialized.com/tutorials/PHP/File-Manipulation/1 http://www.tutorialized.com/tutorial/Data-Access-Benchmarks/5593 http://www.tutorialized.com/tutorial/File-existance-checking/3898 http://www.tutorialized.com/tutorial/File-locking/3905 http://www.tutorialized.com/tutorial/File-Creator-Editor/3012 http://www.tutorialized.com/tutorial/Last-Modified/3016 Those should get you well on your way to creating a flat file system to count hits and such.
The way I see it...
1st file: total_hits.inc(besure to make inc file viewable only by php and might as well place them below the viewable directory)
file lay-out
$hits //$hits is replaced by a running tally of hits
$last_hit // timestamp of last logged hit
$last_ip //ip address of last hit
second file(one will be created every month)
file name: Month_year.inc
$date_timestamp
$hits_count
$ip_address[1 thru whatever] //this is an array of every IP from that day
$browser_per_ip //what browser each ip is using
$tally_unique_ip's
//next day but same month is added below seperated by 2 carriage returns
$date_timestamp
$hits_count
$ip_address[1 thru whatever] //this is an array of every IP from that day
$browser_per_ip //what browser each ip is using
$tally_unique_ip's
Little math and you could have one hell of a stats page.