Start Brillen Contactlinsen Spezialbrillen Video Über uns Impressum

"; // Schrifteinstellungen fonttag $IPFile = "IPs.dat"; // Datei in der die IPs gespeichert werden sollen $LogFile = "Stat.dat"; // Datei in der die Counterdaten gespeichert werden. //************* //* Quelltext * //************* $CurrentIP=$REMOTE_ADDR; if(file_exists($IPFile)) { $IPF=fopen($IPFile,"r+"); $IPData=fgets($IPF,2000); $IPArray=explode("#",$IPData); if(in_array($CurrentIP,$IPArray)) { $Action="read"; } else { $SavedIPs=count($IPArray); if($SavedIPs<=$Num_Save_IP) { fputs($IPF,$CurrentIP."#"); fclose($IPF); $Action="update"; } else { $arrayp=array_pop($IPArray); $IPArray=array_reverse($IPArray); array_push($IPArray,$CurrentIP); $IPArray=array_reverse($IPArray); $AddIP=implode("#",$CurrentIP); $IPF=fopen($IPFile,"w+"); fputs($IPF,$CurrentIP); fclose($IPF); $Action="update"; } } } else { $Counter=fopen($LogFile,"w+"); fputs($Counter,1); fclose($Counter); $IPF=fopen($IPFile,"w^"); fputs($IPF,$CurrentIP."#"); $CurrentCount=1; } if($Action=="update") { $Counter=fopen($LogFile,"r+"); $CurrentCount=fgets($Counter,20); $CurrentCount++; fseek($Counter,0); fputs($Counter,$CurrentCount); fclose($Counter); } if($Action=="read") { $Counter=fopen($LogFile,"r+"); $CurrentCount=fgets($Counter,20); fclose($Counter); } echo "$FontTag $CurrentCount Besucher"; ?>