Php > Graphics
A counter in php using gif images (0.gif, 1.gif, etc) and a text file to save
A counter in php using gif images (0.gif, 1.gif, etc) and a text file to save # just cut and paste this script into one of your php page $fichier=fopen("compteur.txt","r"); #change here the name of your file if ($fichier == 0) { echo "Erreur : fichier incorrect"; } else { $compteur=fgets($fichier,4096); fclose($fichier); $newfichier=fopen("compteur.txt","w"); #change here the name of your file $compteur = $compteur + 1; $num = $length = strlen($compteur); while ($num >= 0) { $CHAR[$num] = substr($compteur, $num, 1); $num--; } $j = 0; while ($j < $length) { echo "
";#change the path of your gifs $j++; } fputs($newfichier,$compteur); fclose($newfichier); } ?>
Php Codes
Algorithms
Arrays
Authentication
Calendar
Code Snippets
Programs
Content Manage
Contest Related
Cookies
Credit Cards
DBase Related
Databases
Date Time
Directories
E-Mail
Errors
File
File System
Forms
Handling
Graphics
HTML and PHP
Informix
Ingres
InterBase
LDAP
Look and Feel
Miscellaneous
MySQL
Other
PHP Classes
Searching
Navigation
Statistics
Strings
User Manage