Simpel user stats scriptje
Door Mitch X, 24 jaar geleden, 4.933x bekeken
Ik had ff geen zin om te vertalen, lijkt me wel duidelijk :)
Quote:
Made by Mitch Vroege
Distributed under GNU General Public License @ phphulp.nl
Filename : readme.txt
Good, you've just got yourself a copy of my lil stats script!
Now, what to do?
First, run this SQL code on your MySQL database.
CREATE TABLE stats (
## Unique id number
id int(11) not null auto_increment,
## IP address
ip varchar(16) not null default '000.000.000.000',
## First visit, in seconds after epoch
first int(20) not null default '0',
## Last visit, in seconds after epoch
last int(20) not null default '0',
## Pageviews
views int(6) not null default '1',
## Time spent on site in seconds
online int(7) not null default '0',
## Set id to be primary key
primary key(id)
) TYPE=MyISAM;
Now, you are nearly done already ;)
Check your files, make sure they have this line in them:
session_start();
Otherwise the script won't work.
To use the stats script, just put this line in every file:
include 'proces.php';
To view the data, goto www.yoursite.com/show.php
Well, that wasn't very hard, was it?
HF & GL, SH4D3H :)
Distributed under GNU General Public License @ phphulp.nl
Filename : readme.txt
Good, you've just got yourself a copy of my lil stats script!
Now, what to do?
First, run this SQL code on your MySQL database.
CREATE TABLE stats (
## Unique id number
id int(11) not null auto_increment,
## IP address
ip varchar(16) not null default '000.000.000.000',
## First visit, in seconds after epoch
first int(20) not null default '0',
## Last visit, in seconds after epoch
last int(20) not null default '0',
## Pageviews
views int(6) not null default '1',
## Time spent on site in seconds
online int(7) not null default '0',
## Set id to be primary key
primary key(id)
) TYPE=MyISAM;
Now, you are nearly done already ;)
Check your files, make sure they have this line in them:
session_start();
Otherwise the script won't work.
To use the stats script, just put this line in every file:
include 'proces.php';
To view the data, goto www.yoursite.com/show.php
Well, that wasn't very hard, was it?
HF & GL, SH4D3H :)
Proces.php in actie
Show.php in actie
Download .rar
Note: in het voorbeeld is 'session_start()' niet opgenomen, de online tijd zal dus niet werken ;)
Daar heb ik dus gewo0n wat ingevuld ^^
Als ik weer eens wat tijd heb, breidt ik hem wel ff wat uit ofsow.
En met enige PHP ervaring kun je het zelf ook wel voor bijvoorbeeld je profielen systeem aanpassen :)
Gesponsorde koppelingen
PHP script bestanden
Er zijn 11 reacties op 'Simpel user stats scriptje'
Om te reageren heb je een account nodig en je moet ingelogd zijn.
PHP hulp
0 seconden vanaf nu