countertracker-met-gd

Gesponsorde koppelingen

PHP script bestanden

  1. countertracker-met-gd

« Lees de omschrijving en reacties

//----------------
//counter.php
//----------------

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
<?php
include('config.php');
mysql_connect($host,$user,$pass);
mysql_select_db($db);
//Language
$ccodes = array (
"ad"  => "Andorra",
"ae"  => "United Arab Emirates",
"af"  => "Afghanistan",
"ag"  => "Antigua en Barbuda",
"ai"  => "Anguilla",
"al"  => "Albania",
"am"  => "Armenië",
"an"  => "Dutch Antilles",
"ao"  => "Angola",
"aq"  => "Antartica",
"ar"  => "Argentina",
"as"  => "American Samoa",
"at"  => "Austria",
"au"  => "Australia",
"aw"  => "Aruba",
"az"  => "Azerbaijan",
"ba"  => "Bosnia Herzegovina",
"bb"  => "Barbados",
"bd"  => "Bangladesh",
"be"  => "Belgium",
"bf"  => "Burkina Faso",
"bg"  => "Bulgarijë",
"bh"  => "Bahrain",
"bi"  => "Burundi",
"bj"  => "Benin",
"bm"  => "Bermuda",
"bn"  => "Brunei Darussalam",
"bo"  => "Bolivia",
"br"  => "Brazil",
"bs"  => "Bahamas",
"bt"  => "Bhutan",
"bv"  => "Bouvet Islands",
"bw"  => "Botswana",
"by"  => "Belarus",
"bz"  => "Belize",
"ca"  => "Canada",
"cc"  => "Cocos (Keeling) Islands",
"cf"  => "Central African Republic",
"cg"  => "Kongo",
"ch"  => "Zwitserland",
"ci"  => "Cote DIvoire",
"ck"  => "Cook Eilanden",
"cl"  => "Chile",
"cm"  => "Kameroen",
"cn"  => "China",
"co"  => "Colombië",
"cr"  => "Costa Rica",
"cs"  => "Czechoslovakia",
"cu"  => "Cuba",
"cv"  => "Cape Verde",
"cx"  => "Kerstmis Eilnaden",
"cy"  => "Cyprus",
"cz"  => "Czech Republic",
"de"  => "German country",
"dj"  => "Djibouti",
"dk"  => "Denmark",
"dm"  => "Dominica",
"do"  => "Dominicaanse Republic",
"dz"  => "Algeria",
"ec"  => "Ecuador",
"ee"  => "Estonia",
"eg"  => "Egypte",
"eh"  => "West Sahara",
"er"  => "Eritrea",
"es"  => "Spanje",
"et"  => "Ethiopia",
"fi"  => "Finland",
"fj"  => "Fiji",
"fk"  => "Falkland Islands (Malvinas)",
"fm"  => "Micronesia",
"fo"  => "Faroe Eilanden",
"fr"  => "France",
"fx"  => "France (Metropolitan)",
"ga"  => "Gabon",
"gb"  => "Great Britanni (UK)",
"gd"  => "Grenada",
"ge"  => "Georgië",
"gf"  => "Frans Guinea",
"gh"  => "Ghana",
"gi"  => "Gibraltar",
"gl"  => "Greenland",
"gm"  => "Gambia",
"gn"  => "Guinea",
"gp"  => "Guadeloupe",
"gq"  => "Equatorial Guinea",
"gr"  => "Greece",
"gs"  => "S. Georgia and S. Sandwich Islands",
"gt"  => "Guatemala",
"gu"  => "Guam",
"gw"  => "Guinea-Bissau",
"gy"  => "Guyana",
"hk"  => "Hong Kong",
"hm"  => "Heard and McDonald Islands",
"hn"  => "Honduras",
"hr"  => "Kroatië",
"ht"  => "Haiti",
"hu"  => "Hongarijë",
"id"  => "Indonesia",
"ie"  => "Ireland",
"il"  => "Israël",
"in"  => "India",
"io"  => "British Indian Ocean Territory",
"iq"  => "Irak",
"ir"  => "Iran",
"is"  => "Ijsland",
"it"  => "Italy",
"jm"  => "Jamaica",
"jo"  => "Jordanië",
"jp"  => "Japan",
"ke"  => "Kenya",
"kg"  => "Kyrgyzstan",
"kh"  => "Cambodia",
"ki"  => "Kiribati",
"km"  => "Comoros",
"kn"  => "Saint Kitts and Nevis",
"kp"  => "North Korea",
"kr"  => "South Korea",
"kw"  => "Kuwait",
"ky"  => "Kaaiman Islands",
"kz"  => "Kazakhstan",
"la"  => "Laos",
"lb"  => "Libanon",
"lc"  => "Saint Lucia",
"li"  => "Liechtenstein",
"lk"  => "Sri Lanka",
"lr"  => "Liberia",
"ls"  => "Lesotho",
"lt"  => "Lithuania",
"lu"  => "Luxemburg",
"lv"  => "Latvia",
"ly"  => "Libya",
"ma"  => "Morocco",
"mc"  => "Monaco",
"md"  => "Moldova",
"mg"  => "Madagascar",
"mh"  => "Marshall Islands",
"mk"  => "Macedonia",
"ml"  => "Mali",
"mm"  => "Myanmar",
"mn"  => "Mongolia",
"mo"  => "Macau",
"mp"  => "Northern Mariana Islands",
"mq"  => "Martinique",
"mr"  => "Mauritania",
"ms"  => "Montserrat",
"mt"  => "Malta",
"mu"  => "Mauritius",
"mv"  => "Maldives",
"mw"  => "Malawi",
"mx"  => "Mexico",
"my"  => "Malaysia",
"mz"  => "Mozambique",
"na"  => "Namibia",
"nc"  => "New Caledonia",
"ne"  => "Niger",
"nf"  => "Norfolk Island",
"ng"  => "Nigeria",
"ni"  => "Nicaragua",
"nl"  => "The Netherlands",
"no"  => "Norway",
"np"  => "Nepal",
"nr"  => "Nauru",
"nt"  => "Neutral Zone",
"nu"  => "Niue",
"nz"  => "New Zealand (Aotearoa)",
"om"  => "Oman",
"pa"  => "Panama",
"pe"  => "Peru",
"pf"  => "French Polynesia",
"pg"  => "Papua New Guinea",
"ph"  => "Philippines",
"pk"  => "Pakistan",
"pl"  => "Poland",
"pm"  => "St. Pierre en Miquelon",
"pn"  => "Pitcairn",
"pr"  => "Puerto Rico",
"pt"  => "Portugal",
"pw"  => "Palau",
"py"  => "Paraguay",
"qa"  => "Qatar",
"re"  => "Reunion",
"ro"  => "Romenië",
"ru"  => "Rusland",
"rw"  => "Rwanda",
"sa"  => "Saudi Arabia",
"sb"  => "Salamon Islands",
"sc"  => "Seychelles",
"sd"  => "Sudan",
"se"  => "Sweden",
"sg"  => "Singapore",
"sh"  => "St. Helena",
"si"  => "Slovenia",
"sj"  => "Svalbard and Jan Mayen Islands",
"sk"  => "Slovaakse Republiek",
"sl"  => "Sierra Leone",
"sm"  => "San Marino",
"sn"  => "Senegal",
"so"  => "Somalia",
"sr"  => "Suriname",
"st"  => "Sao Tome en Principe",
"su"  => "USSR (Former)",
"sv"  => "El Salvador",
"sy"  => "Syria",
"sz"  => "Swaziland",
"tc"  => "Turkish and Caicos Islands",
"td"  => "Chad",
"tf"  => "French Southern Teretoriums",
"tg"  => "Togo",
"th"  => "Thailand",
"tj"  => "Tajikistan",
"tk"  => "Tokelau",
"tm"  => "Turkmenistan",
"tn"  => "Tunisia",
"to"  => "Tonga",
"tp"  => "Oost Timor",
"tr"  => "Turkey",
"tt"  => "Trinidad and Tobago",
"tv"  => "Tuvalu",
"tw"  => "Taiwan",
"tz"  => "Tanzania",
"ua"  => "Ukraine",
"ug"  => "Uganda",
"uk"  => "Vereningde Staten",
"um"  => "US Minor Outlying Islands",
"us"  => "United States",
"uy"  => "Uruguay",
"uz"  => "Uzbekistan",
"va"  => "Vatican City State (Holy See)",
"vc"  => "Saint Vincent and the Grenadines",
"ve"  => "Venezuela",
"vg"  => "Virgin Islands (British)",
"vi"  => "Virgin Islands (US)",
"vn"  => "Vietnam",
"vu"  => "Vanuatu",
"wf"  => "Wallis and Futuna Islands",
"ws"  => "Samoa",
"ye"  => "Yemen",
"yt"  => "Mayotte",
"yu"  => "Yugoslavia",
"za"  => "South Africa",
"zm"  => "Zambia",
"zr"  => "Zaire",
"zw"  => "Zimbabwe",
"com"  => "US Commercial",
"edu"  => "US Education",
"gov"  => "US Goverment",
"int"  => "Internationaal",
"mil"  => "US army",
"net"  => "Network",
"org"  => "Non-Profit Organizatien",
"arpa"  => "Old-Style Arpanet",
"nato"  => "NATO Field"
);



function
ccode($ip) {
  global $ccodes;
  $lang = strtok($_SERVER['HTTP_ACCEPT_LANGUAGE'],",");
  $land=explode('-', $lang);
  $land=$ccodes[$land[1]];
  return $land;
}
function
get_os() {
  if(eregi("(win|windows)[ ]*((nt)*[ /]*([0-9]+(.?[0-9]+))*)", $_SERVER["HTTP_USER_AGENT"])) {
    if(eregi("(win|windows)[ ](95)", $_SERVER["HTTP_USER_AGENT"])) {
      return "Windows 95";
    }
elseif(eregi("(win|windows)[ ](9x)[ ](4.90)", $_SERVER["HTTP_USER_AGENT"])) {
      return "Windows ME";
    }
elseif(eregi("(win|windows)[ ](98)", $_SERVER["HTTP_USER_AGENT"])) {
      return "Windows 98";
    }
elseif(eregi("(win|windows)[ ](NT)", $_SERVER["HTTP_USER_AGENT"])) {
      if(eregi("(win|windows)[ ](NT)[ ](5.1)", $_SERVER["HTTP_USER_AGENT"])) {
        return "Windows XP";
      }
elseif(eregi("(win|windows)[ ](NT)[ ](5.0)", $_SERVER["HTTP_USER_AGENT"])) {
        return "Windows 2000";
      }
else {
        return "Windows NT";
      }
    }
else {
      return "Windows";
    }
  }
elseif(stristr($_SERVER["HTTP_USER_AGENT"], "Linux")) {
    return "Linux";
  }
elseif(stristr($_SERVER["HTTP_USER_AGENT"], "Unix")) {
    return "Unix";
  }
elseif(stristr($_SERVER["HTTP_USER_AGENT"], "Mac")) {
    return "MacOs";
  }
elseif(stristr($_SERVER["HTTP_USER_AGENT"], "PPC")) {
    return "MacOs";
  }
elseif(stristr($_SERVER["HTTP_USER_AGENT"], "HP")) {
    return "HP-UX";
  }
elseif(stristr($_SERVER["HTTP_USER_AGENT"], "SunOS")) {
    return "Sun Solaris";
  }
else {
    return "Unknow";
  }
}

function
browser() {
  if (eregi("MSIE ([0-9]+\.[0-9]+)", $_SERVER["HTTP_USER_AGENT"], $regs)) {
    $name = "Internet Explorer ";
    $version = $regs[1];
  }
elseif (eregi("Opera ([0-9]+\.[0-9]+)", $_SERVER["HTTP_USER_AGENT"], $regs)) {
    $name = "Opera ";
    $version = $regs[1];
  }
elseif (eregi("Firefox/([0-9]+\.[0-9]+)", $_SERVER["HTTP_USER_AGENT"], $regs)) {
    $name = "Firefox ";
    $version = $regs[1];
  }
elseif (eregi("Mozilla/([0-9]+\.[0-9]+)", $_SERVER["HTTP_USER_AGENT"], $regs)) {
    $name = "Netscape ";
    $version = $regs[1];
  }
elseif (eregi("Opera/([0-9]+\.[0-9]+)", $_SERVER["HTTP_USER_AGENT"], $regs)) {
    $name = "Opera ";
    $version = $regs[1];
  }
else {
    $name = $_SERVER["HTTP_USER_AGENT"];
    $version = "";
  }

  return $name . $version;
}

function
provider($IP) {
    $a = gethostbyaddr($IP);
    if($IP == $a) {
    return "Unknow";
    }
else {
    $s = explode(".",$a);
    $provider='http://www.'.$s[(count($s)-2)].'.'.$s[(count($s)-1)];
    $provider='<a href="'.$provider.'" target="_blank">'.ucfirst($s[(count($s)-2)]).'</a>';
    return $provider;
  }
}

$ip=$_SERVER['REMOTE_ADDR'];
$language=ccode($ip);
$os=get_os();
$browser=browser();
$domain=provider($ip);

putenv("TZ=Europe/Amsterdam");
$date=strtotime("now");
//Last guests
$sql="insert into last_guests set domain='".$domain."', country='".$language."', os='".$os."', browser='".$browser."', page='".$_GET['location']."', referrer='".$_GET['referrer']."', datum='".$date."'";
mysql_query($sql);
//today_ip
$sql='select * from today_ip where ip="'.$ip.'"';
$res=mysql_query($sql);
$unique=mysql_fetch_array($res);
$unique=$unique['ip'];
if($unique!=''){
mysql_query('update today_ip set hits=hits+1 where ip="'.$ip.'"');
}

else{
mysql_query('insert into today_ip set ip="'.$ip.'", hits="1"');
}

//Last Days
$dag=date('D');
$sql='select * from lastdays where day="'.$dag.'"';
$res=mysql_query($sql);
$unique2=mysql_fetch_array($res);
$unique2=$unique2['dag'];
if($unique2!=date('d')){
mysql_query('delete * from lastdays where day="'.$dag.'"');
}

if($unique2!=''){
mysql_query('update lastdays set hits=hits+1 where day="'.$dag.'"');
if($unique==''){
mysql_query('update lastdays set unique_hits=unique_hits+1 where day="'.$dag.'"');
}
}

else{
mysql_query('insert into lastdays set day="'.$dag.'", hits="1", unique_hits="1", dag="'.date('d').'"');
}

$sql='select * from browsers where browser="'.$browser.'"';
$res=mysql_query($sql);
$unique3=mysql_fetch_array($res);
if($unique3==''){
mysql_query('insert into browsers set browser="'.$browser.'", hits=1');    
}

else{
mysql_query('update browsers set hits=hits+1 where browser="'.$browser.'"');
}


$sql='select * from os where os="'.$os.'"';
$res=mysql_query($sql);
$unique4=mysql_fetch_array($res);
if($unique4==''){
mysql_query('insert into os set os="'.$os.'", hits=1');    
}

else{
mysql_query('update os set hits=hits+1 where os="'.$os.'"');
}


$sql="select * from provider where provider='".$domain."'";
$res=mysql_query($sql);
$unique5=mysql_fetch_array($res);
if($unique5==''){
mysql_query("insert into provider set provider='".$domain."', hits=1");    
}

else{
mysql_query("update provider set hits=hits+1 where provider='".$domain."'");
}


$sql='select * from language where language="'.$language.'"';
$res=mysql_query($sql);
$unique6=mysql_fetch_array($res);
if($unique6==''){
mysql_query('insert into language set language="'.$language.'", hits=1');    
}

else{
mysql_query('update language set hits=hits+1 where language="'.$language.'"');
}


mysql_query('update config set value=value+1 where name="total_value"');
$sql='select value from config where name="total_value"';
$res=mysql_query($sql);
$total=mysql_fetch_array($res);
$total=$total[0];
header("Content-type: image/png");
$im = imagecreate((strlen($total)*15), 20);
$sizex = '15';
$sizey = '20';
$numb[0] = imagecreatefrompng('img/0.PNG');
$numb[1] = imagecreatefrompng('img/1.PNG');
$numb[2] = imagecreatefrompng('img/2.PNG');
$numb[3] = imagecreatefrompng('img/3.PNG');
$numb[4] = imagecreatefrompng('img/4.PNG');
$numb[5] = imagecreatefrompng('img/5.PNG');
$numb[6] = imagecreatefrompng('img/6.PNG');
$numb[7] = imagecreatefrompng('img/7.PNG');
$numb[8] = imagecreatefrompng('img/8.PNG');
$numb[9] = imagecreatefrompng('img/9.PNG');
for($a=0;$a<strlen($total);$a++){
$numb_t=$total{$a};
imagecopyresampled($im, $numb[$numb_t], ($a*15), 0, 0, 0, $sizex, $sizey, $sizex, $sizey);
}

$sql='SELECT * FROM last_guests ordery by datum DESC limit 19,1';
$res=mysql_query($sql);
$row=mysql_fetch_array($res);
mysql_query('DELETE FROM last_guests where datum>'.$row['datum']);

imagepng($im);
imagedestroy($im);
?>

//----------------
//config.php
//----------------
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
<?php
$host
= "";//mysql host
$user = '';//mysql User
$pass = "";// mysql pass
$db = "";//mysql db
?>

//----------------
//stats.php
//----------------
<html lang="en-us">
<body>
<table width="100%" cellspacing="0" cellpadding="0" align="center">
<tr><td align="center"><h2>This week stats</h2></td></tr>
<tr><td align="center"><font color="#2C7897">Unique</font><b>/</b><font color="#269AB3">Pageviews</font></td></tr>
<tr><td>
<table width="100%" cellspacing="0" cellpadding="0" align="center"><tr>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
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
<?php
include('config.php');
mysql_connect($host,$user,$pass);
mysql_select_db($db);
$sql='SELECT * FROM `lastdays`';
$res=mysql_query($sql);
for($a=0;$a<7;$a++){
$row=mysql_fetch_array($res);
echo '<td width="14%" align="center"><b>'.$row['day'].'</b></td>';
}

echo '</tr><tr>';
$sql='SELECT * FROM `lastdays`';
$res=mysql_query($sql);
$max=mysql_fetch_array(mysql_query('SELECT MAX(hits) FROM `lastdays`'));
$max=120/$max[0];
for($a=0;$a<7;$a++){
$row=mysql_fetch_array($res);
echo '<td align="center" valign="bottom">';
echo '<table width="100%" cellspacing="0" cellpadding="0"><tr><td width="50%" valign="bottom">';
echo '<br><table width="35"><tr><td class="stat2" width="35" height="'.round($row['unique_hits']*$max).'" valign="bottom" align="center"><font color="#000000"><b>'.$row['unique_hits'].'</b></font></td></tr></table>';
echo '</td><td valign="bottom"><br>';

echo '<table width="35"><tr><td class="stat1" width="35" height="'.round($row['hits']*$max).'" valign="bottom" align="center"><font color="#000000"><b>'.$row['hits'].'</b></font></td></tr></table>';
echo '</td></tr></table>';
echo '</td>';
}


?>

</tr></table>
</td></tr>
</table>


<table width="100%" cellspacing="0" cellpadding="0" align="center">
<tr><td align="center" width="100%" colspan="6"><h2>Last Guests</h2></td></tr>
<tr>
<td align="center">OS</td>
<td align="center">Language</td>
<td align="center">Browser</td>
<td align="center">Provider</td>
<td align="center">Page</td>
<td align="center">Sent From</td>
</tr>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
$sql
='SELECT * FROM last_guests ORDER BY datum DESC LIMIT 20';
$res=mysql_query($sql);
$count=mysql_num_rows($res);
for($a=0;$a<$count;$a++){
$row=mysql_fetch_array($res);
if($row['referrer']=='undefined'){
$referrer='/';
}

else{
$referrer='<a href="'.$row['referrer'].'">Click</a>';
}

echo '<tr><td>&nbsp;'.$row['os'].'</td>';
echo '<td>&nbsp;'.$row['country'].'</td>';
echo '<td>&nbsp;'.$row['browser'].'</td>';
echo '<td>&nbsp;'.$row['domain'].'</td>';
echo '<td>&nbsp;<a href="'.$row['page'].'">Click</a></td>';
echo '<td>&nbsp;'.$referrer.'</td></tr>';
}

?>

</table>
<table width="100%" cellspacing="0" cellpadding="0"><tr><td width="50%" valign="top">
<table width="100%" cellspacing="0" cellpadding="0" align="center">
<tr><td align="center" width="100%" colspan="2"><h2>Browsers</h2></td></tr>
<tr>
<td align="center">Browser</td>
<td align="center">Hits</td>
</tr>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
<?php
$sql
='SELECT * FROM browsers ORDER BY hits DESC LIMIT 5';
$res=mysql_query($sql);
$count=mysql_num_rows($res);
for($a=0;$a<$count;$a++){
$row=mysql_fetch_array($res);
echo '<tr><td>'.$row['browser'].'</td>';
echo '<td>'.$row['hits'].'</td></tr>';
}

?>

</table>
</td><td valign="top">
<table width="100%" cellspacing="0" cellpadding="0" align="center">
<tr><td align="center" width="100%" colspan="2"><h2>Os</h2></td></tr>
<tr>
<td align="center">Os</td>
<td align="center">Hits</td>
</tr>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
<?php
$sql
='SELECT * FROM os ORDER BY hits DESC LIMIT 5';
$res=mysql_query($sql);
$count=mysql_num_rows($res);
for($a=0;$a<$count;$a++){
$row=mysql_fetch_array($res);
echo '<tr><td>'.$row['os'].'</td>';
echo '<td>'.$row['hits'].'</td></tr>';
}

?>

</table>
</td></tr></table>


<table width="100%" cellspacing="0" cellpadding="0"><tr><td width="50%" valign="top">
<table width="100%" cellspacing="0" cellpadding="0" align="center">
<tr><td align="center" width="100%" colspan="2"><h2>Languages</h2></td></tr>
<tr>
<td align="center">Languages</td>
<td align="center">Hits</td>
</tr>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
<?php
$sql
='SELECT * FROM language ORDER BY hits DESC LIMIT 5';
$res=mysql_query($sql);
$count=mysql_num_rows($res);
for($a=0;$a<$count;$a++){
$row=mysql_fetch_array($res);
echo '<tr><td>'.$row['language'].'</td>';
echo '<td>'.$row['hits'].'</td></tr>';
}

?>

</table>
</td><td valign="top">
<table width="100%" cellspacing="0" cellpadding="0" align="center">
<tr><td align="center" width="100%" colspan="2"><h2>Providers</h2></td></tr>
<tr>
<td align="center">Providers</td>
<td align="center">Hits</td>
</tr>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
<?php
$sql
='SELECT * FROM provider ORDER BY hits DESC LIMIT 5';
$res=mysql_query($sql);
$count=mysql_num_rows($res);
for($a=0;$a<$count;$a++){
$row=mysql_fetch_array($res);
echo '<tr><td>'.$row['provider'].'</td>';
echo '<td>'.$row['hits'].'</td></tr>';
}

?>

</table>
</td></tr></table>
//----------------
//Counter img
//----------------
Dit is de counter:<br>
<script language="JavaScript">
if(parent.document["referrer"]!=''){
var referrer=parent.document["referrer"];
}
else if(parent.document.referrer!=''){
var referrer=parent.document.referrer;
}
else if(document.referrer!=''){
var referrer=document.referrer;
}
document.write('<a href="stats.php"><img src="counter.php?location='+document.location+'&referrer='+referrer+'" alt="Counter" border="0"></a>');
</script>

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.