bem, tenho um script de um contador de visitas que funciona perfeitamente,
porem, ele é em modo grafico, e eu gostaria que ele retornasse em texto mesmo, que é mais rapido para carregar!
dai eu escolheria uma fonte, como por exemplo, tahoma, numero 10, e ele retornaria assim mesmo, carregando mais rapidamente para pessoas de acesso discado
Obrigado!
<? //>---------------------------------------------------------------------------< //> Simple counter version 1.0 < //> < //> You may use this counter script anywhere you want to, modified in any way < //> to suit your needs provided this header text is not removed. < //> < //> You can register for upgrades by sending your name and e-mail to me at < //> ray@rjj.uk.co < //> < //> Other scripts will be available from time to time, and you can get them < //> Direct from my website at www.webdesigntoolz.co.uk < //>---------------------------------------------------------------------------< //> Configure script variables < //> < //> Modify $counterfile to point at the location of your text counter file. < //> Modify $image directory to point at your counter image directory. Include < //> the backslash. < //> Modify $digits to specify how many digits you want. There is no limit. < //> If you want to use your own images, you need to overwrite the ones < //> provided with this script. They are called '0.jpg' to '9.jpg'. You can < //> use any image type you like, jpeg, png, for example, but you will need to < //> modify the file extensions in the two loops as indicated below. < //>---------------------------------------------------------------------------< $counterfile = "counter.txt"; $imagedirectory = "files/"; $digits = 7; $opencount = @fopen($counterfile,"r"); $currentcount = fread($opencount, filesize($counterfile)); fclose($opencount); $newcount = $currentcount; ++$newcount; $numdigits = strlen($newcount); if ($numdigits > $digits) { $newcount = "0"; } else { } $actdigits = strlen($newcount); //>---------------------------------------------------------------------------< //> To use images other than jpgs, you will need to modify the file extension < //> after the 'else' statement in the following loop. < //>---------------------------------------------------------------------------< for ($a=0;; $a++) { if ($a == $digits) { break; } else { $img[$a] = "$imagedirectory"; $img[$a] .= "0.jpg"; } } //>---------------------------------------------------------------------------< //> To use images other than jpgs, you will need to modify the file extension < //> after the $showdig variable in the following loop. < //>---------------------------------------------------------------------------< for ($a=0;; $a++) { if ($a == $actdigits) { break; } else { $showdig = substr($newcount, $a, 1); $img[$digits - $actdigits + $a] = "$imagedirectory"; $img[$digits - $actdigits + $a] .= "$showdig.jpg"; } } $displayblock = ""; for ($a=0; $a < $digits; $a++){ $displayblock .= "<td><img src=$img[$a]></td>"; } $opennewcount = @fopen($counterfile,"w"); @fwrite($opennewcount, $newcount); fclose ($opennewcount); ?> <html> <head> <body topmargin="0" leftmargin="0"> <title>Contador</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <? echo $displayblock ?> </tr> </table> </body> </html>
no mesmo diretorio desse script tem o arquivo "counter.txt" que é onde fica o numero de acessos, e um diretorio "files/" que ficam as figuras, que no caso seria desnessessario!