my personal fav is this one - its just genious - but requires mysql...
this file is called counter.php:
<?
//db settings
$dbhost = "";
$dbuser = "";
$dbpw = "";
$dbname = "";
$table = "counter";
mysql_connect("$dbhost","$dbuser","$dbpw")
or die("Unable to connect to SQL server!");
@mysql_select_db("$dbname")
or die("Unable to select database!");
if(!$name) { $name = "default"; }
$query = mysql_query("select * from $table where name=\"$name\"");
while ($row = mysql_fetch_array($query)) {
$start = $row[start];
$count = $row[count];
}
if(!$count) {
mysql_query("insert into $table values (current_date()+0,\"1\",\"$name\")");
$count = "1";
}
print("$count");
$count++;
mysql_query("update $table set count=\"$count\" where name=\"$name\"");
?>
then you just put the following line wherever oyu want the counter to appear:
<? $name="index"; include "counter.php"; ?>
you can use as many different counters as you want... if you need a second one just use another value for $name - if you use f.ex. $name="guestbook"; the script will put a new row in your db holding the count for the counter "guestbook" - you dont even have to initialize this row - the scrpt does that for you...
hope it helps - isd