So, id like to make a dashboard for my websites admin that shows the daily hits n stuff. And i know that the vistapanel has all the information that id like to put in my website. I was hoping that there somewhere would be an API that i havent found or something. There probably isnt, but id like to know if there was. This isnt a life or death situation, so if there isnt its completly fine!
Ty
Depending on your needs for statistics, use a local file to store the hits and counts for display. Although a racing mechanism may cause the figures to be slightly off, it’s the most simply way of showing an approximation.
Alternatively, use database connection and transactions to keep track of the hits, however do notice there’s a database query rate limit, and using the database for this purpose might get your website temporarily suspended very quickly.
Tracking hits with PHP code is not possible. While you could log every PHP request, you cannot track requests to non-PHP files through your PHP code. Unless you feed everything through PHP code, but that’s very bad for CPU and EP usage, and the performance of your site.