A lightweight, file‑based visitor tracking tool written in pure PHP — no database required.
This project helps you log, analyze, and visualize visitor IP history for any website.
- Automatically logs each visitor’s IP address
- Stores logs in separate files per page (
ips_page_X.txt) - Displays detailed statistics:
- Unique visitors
- Repeated visits
- Most frequent IP
- Average repeat rate
- Paginated IP viewer (index.php)
- Global statistics dashboard (stat.php)
- Zero dependencies — works on any PHP host
- Super easy to integrate into any existing website
Tracks and displays visitor IP history.
- Reads previous IPs from
ips_page_X.txt - Adds the current visitor's IP
- Updates log file
- Calculates:
- Unique vs repeated IPs
- Max repetition
- Average repetition
- Shows a sorted table of IPs based on frequency
- Includes pagination
Useful for:
- Monitoring real-time traffic
- Checking repeated visits
- Lightweight analytics dashboard
Aggregates statistics from all pages (up to 100 log files).
- Reads all
ips_page_X.txtfiles - Merges all IPs
- Generates global statistics for the entire site
Useful for:
- Full historical analysis
- Understanding visit frequency patterns
- Overview analytics panel
- Upload the files to any PHP-enabled server.
- Ensure PHP has permission to write
.txtfiles. - Visit:
index.phpto see logs and live activitystat.phpto see overall site analytics
No configuration needed.
- Track visitor patterns without using Google Analytics
- Monitor bot or crawler activity
- Anti-abuse / suspicious IP detection
- Simple traffic insight for small websites
- Educational PHP project for logging and file handling
Feel free to open an issue or submit a pull request.
Enjoy your lightweight visitor tracking system 🚀