Ciao a tutti, sul sito www.2inuno.it in fondo noterete la scritta: sei il visitatore ... bene, lì c'era il contatore, c'era perchè questo si è "volatilizzato" improvvisamente, scomparso. Chi l'ha programmato non sa il motivo, non sappiamo cosa fare.
Questo è il codice all'inizio della pagina default.php:
<?php include("counter.php"); ?> e poi:
Sei il visitatore <?php echo $gcc_hits; ?>.
Questo invece è il codice di counter.php:
<?php
//Variabili editabili
$gcc_aspect = "img"; // directory delle immagini
$gcc_file = "./count/counter.txt"; // Nome del file
$gcc_cookie_name = "2inuno"; // nome del cookie
$gcc_cookie_value = "2inuno"; // valore del cookie
$gcc_cookie_life = "900"; // tempo di vita del cookie (in secondi)
if(!file_exists("$gcc_file"))
{
$gcc_fp=fopen("$gcc_file","a");
fputs($gcc_fp,"0");
fclose($gcc_fp);
}
$gcc_alt = 'alt=""';
if(isset($_COOKIE["$gcc_cookie_name"]) && $_COOKIE["$gcc_cookie_name"] == "$gcc_cookie_value")
{
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
$gcc_hits = str_replace("0","[img]$gcc_aspect/0.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("1","[img]$gcc_aspect/1.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("2","[img]$gcc_aspect/2.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("3","[img]$gcc_aspect/3.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("4","[img]$gcc_aspect/4.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("5","[img]$gcc_aspect/5.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("6","[img]$gcc_aspect/6.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("7","[img]$gcc_aspect/7.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("8","[img]$gcc_aspect/8.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("9","[img]$gcc_aspect/9.gif[/img]","$gcc_hits");
// $gcc_hits = $gcc_hits."</a>";
}
else
{
setcookie($gcc_cookie_name, $gcc_cookie_value, time()+$gcc_cookie_life, "");
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
$gcc_hits++;
fseek($gcc_fp,0);
fputs($gcc_fp,$gcc_hits);
fclose($gcc_fp);
$gcc_hits = str_replace("0","[img]$gcc_aspect/0.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("1","[img]$gcc_aspect/1.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("2","[img]$gcc_aspect/2.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("3","[img]$gcc_aspect/3.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("4","[img]$gcc_aspect/4.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("5","[img]$gcc_aspect/5.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("6","[img]$gcc_aspect/6.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("7","[img]$gcc_aspect/7.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("8","[img]$gcc_aspect/8.gif[/img]","$gcc_hits");
$gcc_hits = str_replace("9","[img]$gcc_aspect/9.gif[/img]","$gcc_hits");
// $gcc_hits = $gcc_hits."</a>";
}
//altezza e larghezza del contatore
$gcc_hits = str_replace('alt=""','alt="" border="0" height="15" width="14"',$gcc_hits);
?>
Le immagini stanno in una cartella a parte.
Come mai secondo voi è scomparso all'improvviso?![]()