Jump to content

track hits by day


dingus

Recommended Posts

hey i need a little help with a user tracking system .... my current database looks like this

 

|  Site_ID  |    Site    |    Hits    |

 

now to explain that i have different domains all pointed at the same site and i been wanting to close some of them down so

 

SITE_ID is the ID of the given domain name

 

SITE is the domain name

 

and HITS is the number of hits

 

but i would like to track my user history a little better basicly by time stamp

 

eg show hits

Today

Yesterday

In the last week

IN the last month

in the last year

all time

 

now i been scratching my head about this for a few days now and i cant for the life of me work out how to track it with out bloating the code with time stamps for each day

 

i was considering running a cron job to roll over things every night at mid night

 

just wondering if anyone has any suggestions as to a better way to do it

 

thanks guys

 

Link to comment
https://forums.phpfreaks.com/topic/71337-track-hits-by-day/
Share on other sites

well my only problem is that that will over complicate the process mainly because my host will only give me access to logs via the Cpanel so i would need to authenticate with cpanel before i could directly access the logs then would need to read it in with some sort of curl function i was planing on rolling my own because in the short term it seems easer

Link to comment
https://forums.phpfreaks.com/topic/71337-track-hits-by-day/#findComment-358942
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.