Ver Mensaje Individual
  #14 (permalink)  
Antiguo 01/07/2003, 18:11
Avatar de camargo
camargo
 
Fecha de Ingreso: abril-2002
Ubicación: Kerétaro, Méjiko
Mensajes: 1.045
Antigüedad: 22 años
Puntos: 2
http://www.hotmex.com/phpscripts

Counter 1.0 by Camargo.. este es su codigo:

Código PHP:
<?php

///INICIO DE VARIABLES///

$fondo "white";
$borde "1";
$izq "#CCCCCC";
$der "#e8edf2";

///FIN DE VARIABLES///

///INICIO DE PROGRAMACIÓN///
if (file_exists("visitas.txt")) {

$file fopen("visitas.txt""r+");
flock($file1);
$count fgets($file4096);
$count += 1
fseek($file,0);
fputs($file$count);
flock($file3);
fclose($file);
}

///FIN DE PROGRAMACION///

echo "<table bgcolor=black width=80 cellspacing=1 cellpadding=1><tr>
<td bgcolor=$izq width=18><font size=1 face=Arial><a href=http://www.hotmex.com/phpscripts><center>CC</a></center></font></td>
<td bgcolor=$der width=59><font size=1 face=Arial><p align=right>-$count</p></font></td></tr></table>"
;

?>
Para esto deberas tener un file llamado "visitas.txt" con un valor inicial de "0" y con propiedades de lectura, escritura y ejecucion (chmod 777),,, ..

Salu2
__________________
http://www.chorcha.com

Última edición por camargo; 01/07/2003 a las 18:13