A simple php script to record click count and redirect a url.
This project is written in PHP, using MySQL as its primary database.
- Modify MySQL information at the beginning of both redirect.php and click.php according to your settings
// MySQL Database
$servername = "localhost"; // MySQL Host
$username = "user"; // Username for you database
$password = "pass"; // Password with your username
$dbname = "database"; // Database Name
- Put modified redirect.php and click.php to your server for public access.
If you want to redirect to http://www.google.com, just visit
To see click records, just visit
To create/update a record and redirect to a url:
To view records:
Source code can be found at my GitHub: