in meinem counter script funtzt das cookie nicht mehr!
kann das mal wer überprüfen? ich finde keinen Fehler...
PHP
<?php
$gcc_aspect = "img";
$gcc_file = "counter.txt";
$gcc_alt = 'alt=""';
if(isset($_COOKIE["quadroman"]) && $_COOKIE["quadroman"] == "counter")
{
$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");
}
else
{
setcookie(quadroman, counter, time()+1800, "");
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
$gcc_hits++;
rewind($gcc_fp);
fwrite($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 = str_replace('alt=""','alt="" border="0" height="20" width="15"',$gcc_hits);
?>
Alles anzeigen
danke grüss qman