Skip to content

Tiny PHP script that saves page request statistics into a CSV file

License

Notifications You must be signed in to change notification settings

danferns/stats-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

stats-php

A tiny PHP script that saves page request statistics into a CSV file

Whenever a page with this script is requested, the script will collect the following data:

  • The date and time the page was requested at (in the time zone that you set, or in GMT).
  • The referrer of the page (where the visitor came from), if available.
  • The country the visitor is from (based on their IP address, using https://ipinfo.io).

This data will be appended to stats.txt in this format:

Year,Month,Day of month,Time,Page,Referrer,Country

You can then open this text file and view it with any CSV viewer like Microsoft Office or OpenOffice.

About

Tiny PHP script that saves page request statistics into a CSV file

Topics

Resources

License

Stars

Watchers

Forks

Languages