Free PHP Counter  

View Live Demos
AdFree Counter
Counter FAQ
Contact us / Inprint

Free php-mysql counter

Download mysql counter

Choose your counter version (language pack)

                 more languages

(You are able to translate the counter into a new language? We would be happy to hear from you)

Installation guidance

Step 1:

Extract that mysql_counter.zip file and copy the files counter.php and counter.gif to your webspace. You can copy these files to your homedir, but you can copy these files into a subdir (for example /counter/) as well. Get sure that these files are in the same folder.

Step 2:

Create the two needed tables in mysql. If there is no database you need to create a new data base. You can do this with the phpmyadmin. (??? Look into our FAQ)

Here is the SQL-code for table creation:
  CREATE TABLE `counter_ips` (
  `ip` varchar(15) NOT NULL,
  `visit` datetime NOT NULL,
  UNIQUE KEY `ip` (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


CREATE TABLE `counter_values` (
  `id` bigint(11) NOT NULL,
  `day_id` bigint(11) NOT NULL,
  `day_value` bigint(11) NOT NULL,
  `yesterday_id` bigint(11) NOT NULL,
  `yesterday_value` bigint(11) NOT NULL,
  `week_id` bigint(11) NOT NULL,
  `week_value` bigint(11) NOT NULL,
  `month_id` bigint(11) NOT NULL,
  `month_value` bigint(11) NOT NULL,
  `year_id` bigint(11) NOT NULL,
  `year_value` bigint(11) NOT NULL,
  `all_value` bigint(11) NOT NULL,
  `record_date` datetime NOT NULL,
  `record_value` bigint(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  
The easiest way is to execute these lines ahead into the phpmyadmin.

Step 3:

Open the counter.php in your editor of choice for editing the counter settings.
  • Set your database connection data (??? Look into our FAQ)
  • Set the http path containing the counter.php (??? Look into our FAQ)
  • Set IP-Lock in seconds (??? Look into our FAQ)
Step 4:

Just add an <? include "counter.php"; ?> to the place in your web document (needs to be a .php file, the faq contains instructions how to include the counter into an html document), where you like to have the counter shown. When the counter is inside an folder than add the folder into the include <? include "counter/counter.php"; ?>.

When your website is running with a lot of folders (in different levels), the best would be to use an absolute path <? include "/applications/wamp/htdocs/your-domain.com/counter.php"; ?> (the absolute path is different from server to server, have a look to our faq about absolute paths) to prevent problems.

Step 5:

Save everything. Reload the site and enjoy of your new counter. When you have any problems or got error message pleale look again the installation guidance and look into the faq before you use my support. (When this does not help you, I will help you!)


More questions? Look into our FAQ

You would like to have an adfree counter? Click here

Goto textbased counter

Demo counter:

Ad Visitor Statistics
» 1 Online
» 8 Today
» 45 Yesterday
» 53 Week
» 270 Month
» 270 Year
» 843 Total
Record: 73 (01.01.2009)
(Free PHP Counter)



You like this counter?
Are satisfied with help and support?
You like to appreciate my work?
You like to support me?



Scripts.com
Home | Why is it free? | Live Demos | AdFree Counter | Contact Us / Inprint

Copyright 2008 - free-php-counter.com