|
|
|
| Title : |
a counter in php using gif images (0.gif, 1.gif, etc) and a text file to save
the number of visitors |
| Categories : |
PHP, Graphics |
 Erwan Bossis |
| Date : |
Jun 29th 2000 |
| Grade : |
3 of 5 (graded 16 times) |
| Viewed : |
8214 |
| File : |
No file for this code example. |
| Images : |
No Images for this code example. |
|
| Search : |
More code by Erwan Bossis |
|
| Action : |
Grade This Code Example
|
|
| Tools : |
My Examples List |
|
|
|
|
|
|
# just cut and paste this script into one of your php page
<?
# Written by bossis@nexen.net 29 Jun. 2000
$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 "<img src=images/".$CHAR[$j].".gif>";#change the path of your gifs
$j++;
}
fputs($newfichier,$compteur);
fclose($newfichier);
}
?>
|
|
| Three Cool Classes and One Trick Categories : PHP, PHP Classes, Graphics, Email | | | Creating thumbnails from MySQL Blobs online Categories : PHP, MySQL, Graphics, HTML and PHP, Databases | | | The simple counter with use MySql and gd. Categories : MySQL, HTTP, Graphics, PHP, Databases | | | A class to draw real 3D graphics with surface area Categories : Graphics, PHP, PHP Classes | | | Random Image Display Categories : PHP, Filesystem, Graphics, HTML and PHP | | | Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP, PHP, HTML, PDF, Excel | | | How to create charts for php using Rchart Categories : PHP, Java, JSP, Graphics, Charts and Graphs | | | Read DPI value from image with PHP Categories : PHP, Graphics, Filesystem | | | Snipe.Net's Web Design Color Scheme Previewer- Allows uses to input hex
codes for their text, background, and link colors, and preview the color
scheme with their background image. Example:
http://www.snipe.net/tech/snipeschool/hex.php3 Categories : PHP, HTML and PHP, General, Graphics, HTML | | | Simple graphic clock/watch generation using gd library. Categories : Graphics, Date Time, PHP | | | Display a bar chart based on random values. Categories : Graphics, PHP, GD image library, Charts and Graphs | | | Advanced Image WaterMarker Categories : PHP, PHP Classes, GD image library, Graphics, Object Oriented | | | Simple PHP Bar Graph using GD library Categories : PHP, GD image library, Graphics, Arrays | | | A captcha image allows you to prevent spam posting when users reload the page and stop bots from submitting forms automatically. This version allows you to use your own fonts (.ttf) to show the text.
Categories : PHP, Security, Graphics, GD image library | | | PHP Image Compression using GD library Categories : PHP, Compression, GD image library, Graphics | |
| |
| |
|