PHP statistieken
Dit is het PHP statistieken programma wat PHPhulp ook gebruikt. Ik denk, ik deel het nu gewoon. Zelf heb ik het verwerkt in een class.
Het voorbeeld klopt uiteraard niet. Omdat de pagina te lang is heb ik twee gedeeltes in elkaar gephotoshoped. Vandaar dat de totalen niet kloppen ^^
Je moet de volgende stappen volgen:
Allereerst zorg je dat je een database connectie hebt, wat me logisch lijkt..
1. Kopieƫr de onderstaande SQL codes en voeg ze toe in je MySQL database. Zorg er echter voor dat je: http://www.jouwebsite.nl/images/icons/ vervangt met jouw domeinnaam!
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
`id` int(11) NOT NULL auto_increment,
`uniek` int(11) NOT NULL default '0',
`views` int(11) NOT NULL default '0',
`refs` text NOT NULL,
`ips` text NOT NULL,
`datum` varchar(10) NOT NULL default '',
PRIMARY KEY (`id`)
);
CREATE TABLE `php_statics_agents` (
`id` int(11) NOT NULL auto_increment,
`browser_ids` text NOT NULL,
`datum` varchar(16) NOT NULL default '',
PRIMARY KEY (`id`)
);
CREATE TABLE `php_statics_browsers` (
`id` int(11) NOT NULL auto_increment,
`browser` varchar(30) NOT NULL default '',
`browser_icon` varchar(80) NOT NULL default '',
`search_engine` int(1) NOT NULL default '0',
PRIMARY KEY (`id`)
) AUTO_INCREMENT=127;
INSERT INTO `php_statics_browsers` VALUES (1, 'amaya', '', 0);
INSERT INTO `php_statics_browsers` VALUES (2, 'AmigaVoyager', '', 0);
INSERT INTO `php_statics_browsers` VALUES (3, 'avantbrowser', 'http://www.jouwebsite.nl/images/icons/avantbrowser.gif', 0);
INSERT INTO `php_statics_browsers` VALUES (4, 'bluefish', '', 0);
INSERT INTO `php_statics_browsers` VALUES (5, 'Camino', 'http://www.jouwebsite.nl/images/icons/camino.gif', 0);
INSERT INTO `php_statics_browsers` VALUES (6, 'Chimera', '', 0);
INSERT INTO `php_statics_browsers` VALUES (7, 'libcurl', 'http://www.jouwebsite.nl/images/icons/curl.gif', 0);
INSERT INTO `php_statics_browsers` VALUES (8, 'Dillo', '', 0);
INSERT INTO `php_statics_browsers` VALUES (9, 'DocZilla', '', 0);
INSERT INTO `php_statics_browsers` VALUES (10, 'ELinks', '', 0);
INSERT INTO `php_statics_browsers` VALUES (11, 'Epiphany', '', 0);
INSERT INTO `php_statics_browsers` VALUES (12, 'EudoraWeb', '', 0);
INSERT INTO `php_statics_browsers` VALUES (13, 'fetch', '', 0);
INSERT INTO `php_statics_browsers` VALUES (14, 'Firefox', 'http://www.jouwebsite.nl/images/icons/firefox.gif', 0);
INSERT INTO `php_statics_browsers` VALUES (15, 'Galeon', 'http://www.jouwebsite.nl/images/icons/galeon.gif', 0);
INSERT INTO `php_statics_browsers` VALUES (16, 'Sun', '', 0);
INSERT INTO `php_statics_browsers` VALUES (17, 'RPT', '', 0);
INSERT INTO `php_statics_browsers` VALUES (18, 'IBrowse', '', 0);
INSERT INTO `php_statics_browsers` VALUES (19, 'iCab', '', 0);
INSERT INTO `php_statics_browsers` VALUES (20, 'ICE', '', 0);
INSERT INTO `php_statics_browsers` VALUES (21, 'Meleon', '', 0);
INSERT INTO `php_statics_browsers` VALUES (22, 'Konqueror', 'http://www.jouwebsite.nl/images/icons/konqueror.gif', 0);
INSERT INTO `php_statics_browsers` VALUES (23, 'Links', '', 0);
INSERT INTO `php_statics_browsers` VALUES (24, 'Lynx', '', 0);
INSERT INTO `php_statics_browsers` VALUES (25, 'NCSA_Mosaic', '', 0);
INSERT INTO `php_statics_browsers` VALUES (26, 'MultiZilla', '', 0);
INSERT INTO `php_statics_browsers` VALUES (27, 'MSIE', 'http://www.jouwebsite.nl/images/icons/msie.gif', 0);
INSERT INTO `php_statics_browsers` VALUES (28, 'Netscape', 'http://www.jouwebsite.nl/images/icons/netscape.gif', 0);
INSERT INTO `php_statics_browsers` VALUES (29, 'NetFront', '', 0);
INSERT INTO `php_statics_browsers` VALUES (30, 'NetPositive', '', 0);
INSERT INTO `php_statics_browsers` VALUES (31, 'OffByOne', '', 0);
INSERT INTO `php_statics_browsers` VALUES (32, 'OmniWeb', '', 0);
INSERT INTO `php_statics_browsers` VALUES (33, 'Opera', 'http://www.jouwebsite.nl/images/icons/opera.gif', 0);
INSERT INTO `php_statics_browsers` VALUES (34, 'Oregano', '', 0);
INSERT INTO `php_statics_browsers` VALUES (35, 'PrintSmart', '', 0);
INSERT INTO `php_statics_browsers` VALUES (36, 'Bison', '', 0);
INSERT INTO `php_statics_browsers` VALUES (37, 'Safari', 'http://www.jouwebsite.nl/images/icons/safari.gif', 0);
INSERT INTO `php_statics_browsers` VALUES (38, 'OpenVMS', '', 0);
INSERT INTO `php_statics_browsers` VALUES (39, 'SIS', '', 0);
INSERT INTO `php_statics_browsers` VALUES (40, 'Sylera', '', 0);
INSERT INTO `php_statics_browsers` VALUES (41, 'W3CLineMode', '', 0);
INSERT INTO `php_statics_browsers` VALUES (42, 'WebTV', '', 0);
INSERT INTO `php_statics_browsers` VALUES (43, 'w3m', '', 0);
INSERT INTO `php_statics_browsers` VALUES (44, 'Wget', '', 0);
INSERT INTO `php_statics_browsers` VALUES (45, 'Xenu_Link_Sleuth', '', 0);
INSERT INTO `php_statics_browsers` VALUES (46, 'ABCdatos', '', 1);
INSERT INTO `php_statics_browsers` VALUES (47, 'Ahoy', '', 1);
INSERT INTO `php_statics_browsers` VALUES (48, 'AlkalineBOT', '', 1);
INSERT INTO `php_statics_browsers` VALUES (49, 'AnthillV', '', 1);
INSERT INTO `php_statics_browsers` VALUES (50, 'appie', 'http://www.jouwebsite.nl/images/icons/appie.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (51, 'Arachnophilia', '', 1);
INSERT INTO `php_statics_browsers` VALUES (52, 'Araneo', '', 1);
INSERT INTO `php_statics_browsers` VALUES (53, 'AraybOt', '', 1);
INSERT INTO `php_statics_browsers` VALUES (54, 'ArchitextSpider', '', 1);
INSERT INTO `php_statics_browsers` VALUES (55, 'arks', '', 1);
INSERT INTO `php_statics_browsers` VALUES (56, 'ASpider', '', 1);
INSERT INTO `php_statics_browsers` VALUES (57, 'ATN_Worldwide', '', 1);
INSERT INTO `php_statics_browsers` VALUES (58, 'Atomz', '', 1);
INSERT INTO `php_statics_browsers` VALUES (59, 'AURESYS', '', 1);
INSERT INTO `php_statics_browsers` VALUES (60, 'BackRub', '', 1);
INSERT INTO `php_statics_browsers` VALUES (61, 'BaySpider', '', 1);
INSERT INTO `php_statics_browsers` VALUES (62, 'bbot', '', 1);
INSERT INTO `php_statics_browsers` VALUES (63, 'Big Brother', '', 1);
INSERT INTO `php_statics_browsers` VALUES (64, 'Bjaaland', '', 1);
INSERT INTO `php_statics_browsers` VALUES (65, 'BlackWidow', '', 1);
INSERT INTO `php_statics_browsers` VALUES (66, 'Die Blinde Kuh', '', 1);
INSERT INTO `php_statics_browsers` VALUES (67, 'borg-bot', '', 1);
INSERT INTO `php_statics_browsers` VALUES (68, 'BoxSeaBot', '', 1);
INSERT INTO `php_statics_browsers` VALUES (69, 'BSpider', '', 1);
INSERT INTO `php_statics_browsers` VALUES (70, 'CACTVS Chemistry Spider', '', 1);
INSERT INTO `php_statics_browsers` VALUES (71, 'Calif', '', 1);
INSERT INTO `php_statics_browsers` VALUES (72, 'Digimarc', '', 1);
INSERT INTO `php_statics_browsers` VALUES (73, 'Checkbot', '', 1);
INSERT INTO `php_statics_browsers` VALUES (74, 'ChristCrawler', '', 1);
INSERT INTO `php_statics_browsers` VALUES (75, 'cIeNcIaFiCcIoN.nEt', '', 1);
INSERT INTO `php_statics_browsers` VALUES (76, 'CMC', '', 1);
INSERT INTO `php_statics_browsers` VALUES (77, 'LWP', '', 1);
INSERT INTO `php_statics_browsers` VALUES (78, 'combine', '', 1);
INSERT INTO `php_statics_browsers` VALUES (79, 'Confuzzledbot', '', 1);
INSERT INTO `php_statics_browsers` VALUES (80, 'CoolBot', '', 1);
INSERT INTO `php_statics_browsers` VALUES (81, 'Googlebot', 'http://www.jouwebsite.nl/images/icons/google.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (82, 'Infoseek', 'http://www.jouwebsite.nl/images/icons/infoseek.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (83, 'Ask Jeeves', 'http://www.jouwebsite.nl/images/icons/ask.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (84, 'Lycos', 'http://www.jouwebsite.nl/images/icons/lycos.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (85, 'UdmSearch', '', 1);
INSERT INTO `php_statics_browsers` VALUES (86, 'MSNBOT', 'http://www.jouwebsite.nl/images/icons/msn.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (87, 'Robozilla', 'http://www.jouwebsite.nl/images/icons/mozilla.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (88, 'Scooter', 'http://www.jouwebsite.nl/images/icons/altavista.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (89, 'Sleek Spider', '', 1);
INSERT INTO `php_statics_browsers` VALUES (90, 'Shagseeker', '', 1);
INSERT INTO `php_statics_browsers` VALUES (91, 'mouse.house', '', 1);
INSERT INTO `php_statics_browsers` VALUES (92, 'spiderline', '', 1);
INSERT INTO `php_statics_browsers` VALUES (93, 'sygol', '', 1);
INSERT INTO `php_statics_browsers` VALUES (94, 'whatUseek', 'http://www.jouwebsite.nl/images/icons/whatuseek.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (95, 'Altavista', 'http://www.jouwebsite.nl/images/icons/altavista.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (96, 'All the web', 'http://www.jouwebsite.nl/images/icons/alltheweb.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (97, 'Excite', 'http://www.jouwebsite.nl/images/icons/excite.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (98, 'Go.com', 'http://www.jouwebsite.nl/images/icons/go.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (99, 'Ilse', 'http://www.jouwebsite.nl/images/icons/ilse.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (100, 'Zoek.nl', 'http://www.jouwebsite.nl/images/icons/zoek.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (101, 'MetaCrawler', '', 1);
INSERT INTO `php_statics_browsers` VALUES (102, 'Teoma', '', 1);
INSERT INTO `php_statics_browsers` VALUES (103, 'Ask Jeeves', 'http://www.jouwebsite.nl/images/icons/ask.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (104, 'Vinden.nl', 'http://www.jouwebsite.nl/images/icons/vinden.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (105, 'Yahoo', 'http://www.jouwebsite.nl/images/icons/yahoo.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (106, 'Looksmart', 'http://www.jouwebsite.nl/images/icons/looksmart.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (107, 'Lycos', 'http://www.jouwebsite.nl/images/icons/lycos.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (108, 'Msn', 'http://www.jouwebsite.nl/images/icons/msn.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (109, 'Overture', 'http://www.jouwebsite.nl/images/icons/overture.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (110, 'My Way', 'http://www.jouwebsite.nl/images/icons/myway.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (111, 'Ixquick', 'http://www.jouwebsite.nl/images/icons/lxquick.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (112, 'ABCsearch', 'http://www.jouwebsite.nl/images/icons/abcsearch.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (113, 'Galaxy', 'http://www.jouwebsite.nl/images/icons/galaxy.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (114, 'HotBot', 'http://www.jouwebsite.nl/images/icons/hotbot.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (115, 'Vindex', 'http://www.jouwebsite.nl/images/icons/vindex.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (116, 'Voila', 'http://www.jouwebsite.nl/images/icons/voila.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (117, 'WiseNut', 'http://www.jouwebsite.nl/images/icons/wisenut.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (118, 'Web.nl', 'http://www.jouwebsite.nl/images/icons/web.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (119, 'Kobala', 'http://www.jouwebsite.nl/images/icons/kobala.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (120, 'Netscape', 'http://www.jouwebsite.nl/images/icons/netscape.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (121, 'Search.com', 'http://www.jouwebsite.nl/images/icons/search.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (122, 'MySearch', 'http://www.jouwebsite.nl/images/icons/mysearch.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (123, 'Walhello', 'http://www.jouwebsite.nl/images/icons/walhello.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (124, 'Zoeken.nl', 'http://www.jouwebsite.nl/images/icons/zoeken.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (125, 'Google', 'http://www.jouwebsite.nl/images/icons/google.gif', 1);
INSERT INTO `php_statics_browsers` VALUES (126, 'GGLD', 'http://www.jouwebsite.nl/images/icons/google.gif', 1);
2. Sla de bestanden op met de namen die hier genoemd worden
3. Include het bestand reg_stats.php op iedere pagina
4. Sla het zip bestand op met de zoekmachine en browser icons: stats_icons.rar
5. Sla de icons op in: /images/icons/ (dit kun je in het script aanpassen indien je een ander path hebt voor je icons)
6. Ga naar het bestand show_stats.php en bekijk je statistieken
De statistieken zijn op het moment enkel per dag te bekijken. Maand overzicht e.d. moet er nog in gemaakt worden..
Have fun!
Gesponsorde koppelingen
PHP script bestanden
Er zijn 32 reacties op 'Php statistieken'
Om te reageren heb je een account nodig en je moet ingelogd zijn.
PHP hulp
0 seconden vanaf nu