Click Counter Script

As a replacement for using trackers in automation station you can install a php click counter script.  Php Click Counter is a fast and easy to install script that will allow you to track the clicks on your site and hide your affiliate ID.
If you need to know more about FTP read the knowledgebase article on FTP
Installation

Please take 5 minutes time and read installation instructions carefully and completely! This will ensure a proper and easy installation.

  1. Create a folder in your public_html folder named clicker (or anything you wish to call it)
  2. Open file settings.php in your favorite PLAIN TEXT editor (like Notepad or Wordpad on Windows systems,  DO NOT use MS Word or similar editor), scroll down to where it says "SETUP YOUR COUNTER" and set these variables:

    Variable Description/Setup
    $settings['apass'] Change the default password admin to the password you will use to login to the Admin panel. Use only letters a-Z, A-Z and digits 0-9.

    TIP: For security reasons choose a unique password and not a password you use to access other parts of your website (like FTP, control panel, e-mail, ...).
    $settings['click_url'] Set this variable to the URL of click.php file when uploaded to your server, for example:
    http://www.yourdomain.com/clicker/click.php
    $settings['count_unique'] Enable counting clicks hits only. For more information read Counting UNIQUE clicks below.
    $settings['unique_hours'] Number of hours a click is considered unique. For more information read Counting UNIQUE clicks below.

    TIP: There are few optional advanced settings in the settings.php file, don't change any of them unless you understand what they do.

  3. Save and close the settings.php file.

  4. FTP to the public_html folder of your account and create a folder where you will install CCount (for example named "clicker").
    Example: /public_html/clicker
    Corresponding URL: http://www.yourdomain.com/clicker

  5. Upload all CCount files to this folder. Images (delete.gif, edit.gif, line.gif and reset.gif) must be transferred in BINARY mode, all other files in ASCII mode (refer to your FTP client instructions for details on how to set transfer mode properly).

  6. Make sure that the PHP scripts have permission to write to files clicks.txt and ids.txt. On Unix (Linux) servers CHMOD these files
    to 666 (rw-rw-rw-).

That's it, your CCount should work now!

In your browser open URL where you have installed CCount, for example:
http://www.yourdomain.com/clicker

Type in the admin password you set in settings.php, click Enter admin panel and voila, you are in the Admin panel! Things should be easy from now on. Use the Add a link form to add links you wish to count clicks on and follow instructions.

Got an error message or can'tlogin? A few solutions can be found below under HELP and Troubleshooting.

Using PHP Click Counter

Not sure how to use CCount to count click? Here is a sample setup:

  1. You want to count how many times the link to Yahoo.com has been clicked from your website. You have the  link pointing to http://www.yahoo.com and this is the HTML code on your website:
    Go to Yahoo!
  2. Login into the CCount Admin panel. Open
    http://www.yourdomain.com/clicker
    and enter your admin password.
  3. Find the form titled Add a link. In the Link URL: enter the link you want to count clicks on. In this example you would enter
    http://www.yahoo.com

    Optionally you can also choose a name for your link (for example Link to Yahoo from homepage) and the number you want  to start counting from (if you want to start counting from 100 enter 100 in the box).
  4. Click the Add link button and the link will be added to CCount.

    You will be given a link ending with click.php?id=ID where ID is a number, for example:
    http://www.yourdomain.com/clicker/click.php?id=1

    This is called a tracking link.
  5. Now instead of linking directly to the link you are counting clicks on, you need to link to your tracking link instead!
    In our example instead of linking directly to http://www.yahoo.com, you must link to
    http://www.yourdomain.com/clicker/click.php?id=1

    The HTML code you would use for your link is for example
    Go to Yahoo!

    When someone clicks on the tracking link CCount will count click on the link and then redirect your visitor to http://www.yahoo.com

Counting UNIQUE hits

If you wish to count unique clicks only, then set $settings['count_unique'] to 1 in the settings.php file. Doing so CCount
will only count clicks considered unique.

Unique clicks are tracked with the help of cookies. Number of hours a click is considered unique can be adjusted by modifying value for $settings['count_unique'] in the settings.php file. A value of 24 means only one click from the same browser will count as unique within a 24-hour period.

  • Email, SSL
  • 44 Users Found This Useful
Was this answer helpful?

Related Articles

Script troubleshooting (CGI, Perl, PHP, etc.)

Incorrectly Set Permissions (general) The mother of all errors, knowing what the file...

Working with phpSuExec or suPHP - Secure PHP environment

What is is and why we use itUsing phpSuExec creates a more secure environment for executable...

Help! My PHP script doesn't work or I am getting an error message when I run it

For security reasons, we have upgraded PHP to include phpSuexec. If you are experiencing...

Powered by WHMCompleteSolution