Skip to content

tritech-cyber/phphitcounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phphitcounter

This code is for testing puposes only.
Do not use this code as a certified hit counter.


Use this code to create a table in the stream database as follows:

CREATE TABLE IF NOT EXISTS `hits` (
  `id` int(32) NOT NULL auto_increment,
  `ip` varchar(32) NOT NULL,
  `timein` varchar(32) NOT NULL,
  `datein` varchar(32) NOT NULL,
  `pagename` varchar(32) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=0;

Create a user for the stream database:

GRANT ALL PRIVILEGES ON datebase_name.* TO 'username'@'localhost' IDENTIFIED BY 'password';	
GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'%' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON stream.* TO 'suser'@'localhost' IDENTIFIED BY 'password';	

Place this code on top of your index.php page:


<?php
session_start();
$_SESSION['pagename'] = "zulu index";
include "db/pushhits.php";
?>

CREATE TABLE IF NOT EXISTS hits ( id int(32) NOT NULL auto_increment, ip varchar(32) NOT NULL,timein varchar(32) NOT NULL, datein varchar(32) NOT NULL, pagename varchar(32) NOT NULL, PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages