| Abax Hit Counter v1.00 (PHP) |
A web page hit counter written in PHP, it is fully configurable and customisable, click on the link below to download it. A full setup instruction file is included within the zip file. There are also four graphical counter styles to choose from, included in this release. Key features: Image based, text based or invisible you choose. Text counter can be formatted how you want i.e. set colour, font size & style. Works with SSI or without. Download: Download Abax Hit Counter v1.00 |
Examples: | Image Based Counter | Text Based Counter |
#Abax Hit Counter v1.00 - Copyright 2001 By Nathan Dickman - visit http://www.NathanDickman.com/
#This script may be freely distributed providing all copyright headers are kept intact
//Abax Hit Counter configuration//
$datafile="countdata.dat"; //filename for counter datafile
$counterstyle = "image"; //enter text for text,image for images, or invisible for none
$textcountlength = 8; //length of counter in digits if using text option
$font = "Arial, Helvetica, sans-serif"; //font face style if using text counter
$fontsize = "1"; //font size if using text counter
$fontcolour = "#FF6600"; //font colour use html colour codes
$imagedirectory = "images/"; //directory or http location to images NOTE: use trailing slash
$imagesext = ".gif"; //file extension for images e.g. .gif .jpg .png
$initialvalue = 1;
//MAIN CODE//
if (!file_exists($datafile)) {
$file = fopen($datafile,"w+");
fwrite ($file,$initialvalue);
fclose ($file);
}
else {
$file = fopen($datafile,"r+");
$hitcount = fread($file,filesize($datafile));
fclose ($file);
};
$hitcount++;
$file = fopen($datafile,"w+");
fwrite ($file,$hitcount);
if ($counterstyle != "invisible") {
if ($counterstyle == "text") {
echo " "
.sprintf("%0"."$textcountlength"."d",$hitcount)."";
}
else {
$longstr = strlen($hitcount);
for ($x=0; $x < $longstr; $x++) {
$image = substr($hitcount,$x,1);
echo "  ";
}
}
}
?> |
#Abax Hit Counter v1.00 - Copyright 2001 By Nathan Dickman - visit http://www.NathanDickman.com/
#This script may be freely distributed providing all copyright headers are kept intact
//Abax Hit Counter configuration//
$datafile="countdata1.dat"; //filename for counter datafile
$counterstyle = "text"; //enter text for text,image for images, or invisible for none
$textcountlength = 8; //length of counter in digits if using text option
$font = "Arial, Helvetica, sans-serif"; //font face style if using text counter
$fontsize = "1"; //font size if using text counter
$fontcolour = "#FF6600"; //font colour use html colour codes
$imagedirectory = "images/"; //directory or http location to images NOTE: use trailing slash
$imagesext = ".gif"; //file extension for images e.g. .gif .jpg .png
$initialvalue = 1;
//MAIN CODE//
if (!file_exists($datafile)) {
$file = fopen($datafile,"w+");
fwrite ($file,$initialvalue);
fclose ($file);
}
else {
$file = fopen($datafile,"r+");
$hitcount = fread($file,filesize($datafile));
fclose ($file);
};
$hitcount++;
$file = fopen($datafile,"w+");
fwrite ($file,$hitcount);
if ($counterstyle != "invisible") {
if ($counterstyle == "text") {
echo " "
.sprintf("%0"."$textcountlength"."d",$hitcount)."";
}
else {
$longstr = strlen($hitcount);
for ($x=0; $x < $longstr; $x++) {
$image = substr($hitcount,$x,1);
echo "  ";
}
}
}
?> |
|
NathanDickman.com copyright 2000-2013 iPhone Parts and Repairs visit http://www.ipaqrepair.co.uk/ |