Ver Mensaje Individual
  #5 (permalink)  
Antiguo 11/09/2003, 12:17
Jordi1
 
Fecha de Ingreso: abril-2003
Mensajes: 656
Antigüedad: 21 años
Puntos: 1
Código PHP:
<?php
//create a file called counter.txt and upload it to your server
//now open the file
$fp fopen("counter.txt" "r");
//read in the current count
$count = (int)fread($fp1024);
//increment the count by 1
$count++;
//close the file
fclose($fp);
//image display, get the lentgth of the count
for ($i ;$i strlen($count) ; $i++)
{
$imgsrc substr($count,$i ,1);
//display the image(s) note our images are in a folder located at
//images/count1/ change this to your location
echo "<img src =\"/contador/count/01/" $imgsrc ".gif\">";
}
//open the counter file
$fp fopen("counter.txt""w"); 
//write the new count to the file



$count=sprintf("%05d",$count);//PRUEBA ASI



fwrite($fp$count); 
//close the file
fclose($fp);
A VER SI TE SIRVE