Re: tracking DAILY web hits for summary reports
| From: | Joe Koenig | Date: | Fri, 07 Jul 2000 15:46:14 +0000 |
| Subject: | Re: tracking DAILY web hits for summary reports | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5395@lists.php.net to get a copy of this message | ||
Paul,
From the sounds of it, mktime() should work for that. Take your starting
date and split it - add however many days you need to ad and pass the month
and day value to mktime() and it will figure out if it needs to be the next
month or not. Hope this helps,
Joe
Paul Fernandez wrote:
> Hello,
>
> The boss wants PHP to compile hit stats day by day. Then he can type in
> 2 dates (start & end) and get a graph of all the hits per day.
>
> I am using a graphing class, which will work fine. But it needs a 2-d
> array of data to work. No sweat...
>
> I'm using a file-based solution, since the web server is outside the
> firewall and can't access our database.
>
> I have PHP opening a file, reading its contents (the # of hits),
> incrementing that # and re-writing that file. Each day there is a file,
> for example, 06-JUL-00.txt and 07-JUL-00.txt.
>
> Has anyone else had a similar project? My challenge has been to loop
> through, change the filename that I'm opening, without looking for
> 32-JUL-00 when it really wants 02-AUG-00.
>
> any help is appreciated :)
>
> --
> Paul Fernandez
> Webmaster
> Structural GenomiX, Inc.