faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

8 of 22 people (36%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How would i make a simple counter with text? (ie visitors: 17319)

Mar 19th, 2008 22:15
ha mo, Philip Olson, Ayse Geertsma, ken vrunt,


Here's an example:
<?php
$filename = 'yourcounterfile.txt';
$count = intval(file_get_contents($filename));
$fp = fopen($filename, 'w');
fwrite($fp, ++$count);
fclose($fp);
?>
http://www.tantofa.com
http://www.fantofa.com
http://www.mantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.templatestemp.com