PHP Classes
elePHPant
Icontem

PHP Click Counter Database: Generate links and keep track of clicks on them

Recommend this page to a friend!
  Info   View files Example   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2015-11-11 (4 years ago) RSS 2.0 feedStarStarStarStar 68%Total: 290 All time: 7,358 This week: 333Up
Version License PHP version Categories
click-counter 1.0MIT/X Consortium ...5.0HTML, PHP 5, User Management
Description Author

This class can generate links and keep track of clicks on them.

It can take the URL of a given link and returns another URL that will be used to keep track of the clicks on that link.

The link points to a script that will be used to record the clicks on a database accessed via PDO, and then it redirects the browser to the original link.

Alternatively the class can also store the clicked links of text files.

The database connection string, the URL for invalid links, the destination link base URL, the file for storing click counts are some of the configurable parameters.

Recommendations

Looking for good pluggable click tracker mechanism
Would like to track how many times various buttons are clicked

  Performance   Level  
Name: Ettore Moretti is available for providing paid consulting. Contact Ettore Moretti .
Classes: 12 packages by
Country: Italy Italy
Age: ???
All time rank: 112743 in Italy Italy
Week rank: 312 Up18 in Italy Italy Up
Innovation award
Innovation award
Nominee: 3x

 

Details

ClickCounter

ClickCounter is a PHP class that allows you to control the number of visitors who clicked on certain links. Useful for statistics on navigation and \ or downloading files.

How use it

To use the class will need, call the static method getHref class CCounter, passing as the only argument the link Example:


If the link is unreachable, the class will direct the browser to the 404 page indicated in configurations. 
  Files folder image Files  
File Role Description
Files folder imagecore (3 files)
Files folder imageinstall (1 file)
Accessible without login Plain text file 404.php Aux. Auxiliary script
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file link1.html Data Auxiliary data
Accessible without login Plain text file link2.html Data Auxiliary data
Accessible without login Plain text file link3.html Data Auxiliary data
Accessible without login Plain text file link4.html Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  core  
File Role Description
  Plain text file CCounter.class.php Class Class source
  Accessible without login Plain text file CCounter.config.php Conf. Configuration script
  Accessible without login Plain text file CCounter.hrefPointer.php Aux. Auxiliary script

  Files folder image Files  /  install  
File Role Description
  Accessible without login Plain text file tableCreate.sql Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:290
This week:0
All time:7,358
This week:333Up
User Ratings User Comments (1)
 All time
Utility:83%StarStarStarStarStar
Consistency:91%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:91%StarStarStarStarStar
Tests:-
Videos:-
Overall:68%StarStarStarStar
Rank:558
 
This is a very good and useful class ;-)
3 years ago (Josť Filipe Lopes Santos)
80%StarStarStarStarStar