PHP PROJECT

README.md

Count user visits and display in a image widget

This class count user visits and display in a image widget. It can record the accesses of site visitors in a MySQL database. The class can also generate an image for a widget that displays the number of visitors of the site pages. The image widget details like font color, font style, font, background color can be configured.

Files


NameTypeSizeLast Modified
HCW_class.php phpfile icon 6289 31 January 2017 01:34:20
HCW_widget.php phpfile icon 384 14 January 2016 09:51:20
example.php phpfile icon 337 14 January 2016 09:51:20
HCW_example.php phpfile icon 337 14 January 2016 09:51:20
HCW_SQL.txt textfile icon 615 14 January 2016 09:51:20
hc directory icon 4096 31 March 2017 08:37:26
HCW_config.php phpfile icon 314 14 January 2016 09:51:20
template directory icon 4096 31 March 2017 08:37:26

Source

  1. <?
  2. $dbuser=''
  3. $dbpass='';
  4. $dbname '';
  5. define("fullurl","http://demo.v23.in/hitcounter/hc/");
  6. define("url","http://demo.v23.in/hitcounter");
  7. //ttf font folder -  edit
  8. define("TTF","/home/user/demo/hitcounter/vishvttf"); // without slash
  9. $hcw = new hitcounterwidget("localhost",$dbuser$dbpass,$dbname);

Demo

You can find a demo available here: Hit Counter

Requirment

  • mySql
  • PHP >= 5.4
  • Apache Server

Contribute

  • Vishv Sahdev

Example

  1. <?
  2. require("HCW_class.php");
  3. require("HCW_config.php");
  4.     if(isset($_POST['ok']) && $_POST['ok'] == "ok"){
  5.     $hcw->transfer($_POST);
  6.     }
  7.     else
  8.     $hcw->ar['mc']='';
  9.     
  10.     $hcw->ar['font']=$hcw->findTTF();
  11.     
  12.     if(is_file("./template/HCW_template.php")){
  13.             echo $hcw->render_temp("./template/HCW_template.php",$hcw->ar);
  14.     }
  15.     

>>

Download