/* dcounter.php3 */
/* Embedded page-hit counter for PHP 3
D. Shahbaz, copyright 1998
$pageHitCount += 1;
$fp = fopen($filename,"r+");
fwrite($fp, "<? \$pageHitCount = $pageHitCount // <- Don't touch ?> ", 58);
/* mypage.php3 */
<? $pageHitCount = 19 // <- Don't touch ?>
<?php include "dcounter.php3" ?>
/* The above two lines should be the first lines of your script. */
/* The following lines can be anywhere you want the hits to be shown. */
UpdateHitCount("mypage.php3"); /*maybe UpdateHitCount($PHP_SELF) will work?*/
echo "Hits on this cool page: $pageHitCount";
Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.