
30/12/2001, 10:59
|
| | Fecha de Ingreso: noviembre-2001
Mensajes: 415
Antigüedad: 23 años, 6 meses Puntos: 0 | |
Re: Sencillo para ustedes un contador de visitas es facil
<pre>#!/usr/bin/perl -w
use strict;
my $cantvisitas;
my @archivo;
if (-e "visitas.txt") {
open (ARCHIVO, "visitas.txt");
@archivo = <ARCHIVO>;
close (ARCHIVO);
}
$cantvisitas = $archivo[0] + 1;
open (ARCHIVO, ">visitas.txt");
print ARCHIVO $cantvisitas;
close (ARCHIVO);
print "Content-type: text/html\n\n";
print $cantvisitas; </pre>
usando un SSI
"<!--#exec cgi="visitas.cgi" -->" dentro de un .shtml, ya esta. |