┏┓┏┓╋╋╋╋╋╋╋╋╋╋┏┓╋╋╋┏┓┏┓
┃┗┫┗┳━┳┳┳┳━┳━┳┛┣━┳┳┫┗┫┗┳━┳┳┓
┃┏┫┃┃┻┫┃┃┃╋┃╋┃╋┃━┫┃┃┏┫┏┫┻┫┏┛
┗━┻┻┻━┻━━┻━┻━┻━┻━┻━┻━┻━┻━┻┛

Videos :: All Posts :: Tags :: RSS :: IMG :: About :: Test :: THE.ARMADA  


How to make a PHP hit counter!

June 26, 2023 — t̷h̷e̷8̷w̷o̷o̷d̷c̷u̷t̷t̷e̷r̷

Write this into your 'hitcounter.php' file:

// Please only put on index page of only one PHP file per directory
$path = './hits.txt';
$count = file_get_contents($path, TRUE);
$count = $count + 0;
$hits = $count;
$count++;
$cmd = "echo $count > $path";
exec($cmd);
echo "HITS: $hits";


Then make sure to include "./hitcounter.php"; on ever index page on your site :D:D

My score for this software at time of posting is 🥈✪✪✪✪✪✫✪✫✪✪ [11.5/10]

Tags: HitCounter, WebGoodies, WebDev, PHP, TheDays



.. - 𝕥𝕙𝕖𝟠𝕨𝕠𝕠𝕕𝕔𝕦𝕥𝕥𝕖𝕣...-..