Jump to content
xisto Community
Sign in to follow this  
iGuest

Counter With Img In Flat File

Recommended Posts

this is a counter with images and
stor in flat file
becouse i can not upload .zip .rar file iwell
program it on this post
at frist you need to 2 files
count.php
count.txt
and you need else make folder has name gifs
and make 10 pictuer 10 file
0.gif to 9.gif
now all ok
open the count.php and add this code

<? ### IMAGE FORMAT $format = ".gif"; $file = file("count.txt"); $num = ($file[0] + 1); exec("echo $num > count.txt"); switch($type) { case "text":   echo $num;   break; case "gfx":   $i = 0;   $cntn = strlen($num);   while($i < $cntn) {    $tmpnum = substr($num, $i, 1);    echo("<img src=\"$dir/$tmpnum$format\">");    $i++;   }   break; case "q": break; default: echo("count.php <b>error</b> : type not specified."); break; } ?>
thats all

Share this post


Link to post
Share on other sites

If this is a script that is supposed to produce a hit counter that loads images for its numbers, it is poorly designed. The concept that is.With the fonts, colours and various CSS properties available and usable in todays browsers, why do we need to make a counter with images?As for the functionality of your PHP script, I haven't tested it out yet but I would think that if I were to write a counter, I would store the data within the PHP file itself.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.