F
force2k1
Also ich möchte einen Klickcounter machen ich hab es bisjetzt so gemacht das würde funktionieren wenn ich für jede file eine eigene txt mache ! aber wie mache ich es jetzt das der die alle in eine speichert ??? und wie muss dann der für jede id der auslese script aussehen ???
<?
if ($id=="1")
{$fp=fopen("dlcount.txt","r");
$count=fgets($fp,1024);
fclose($fp);
$fw=fopen("dlcount.txt","w");
$cnew=$count+1;
$countnew=fputs($fw,$count+1);
fclose($fw);
header("location: http://www.domain.de/file1.zip");}
elseif ($id=="2")
{$fp=fopen("dlcount.txt","r");
$count=fgets($fp,1024);
fclose($fp);
$fw=fopen("dlcount.txt","w");
$cnew=$count+1;
$countnew=fputs($fw,$count+1);
fclose($fw);
header("location: http://www.domain.de/file2.zip");}
elseif ($id=="3")
{$fp=fopen("dlcount.txt","r");
$count=fgets($fp,1024);
fclose($fp);
$fw=fopen("dlcount.txt","w");
$cnew=$count+1;
$countnew=fputs($fw,$count+1);
fclose($fw);
header("location: http://www.domain.de/file3.zip");}
?>
<?
if ($id=="1")
{$fp=fopen("dlcount.txt","r");
$count=fgets($fp,1024);
fclose($fp);
$fw=fopen("dlcount.txt","w");
$cnew=$count+1;
$countnew=fputs($fw,$count+1);
fclose($fw);
header("location: http://www.domain.de/file1.zip");}
elseif ($id=="2")
{$fp=fopen("dlcount.txt","r");
$count=fgets($fp,1024);
fclose($fp);
$fw=fopen("dlcount.txt","w");
$cnew=$count+1;
$countnew=fputs($fw,$count+1);
fclose($fw);
header("location: http://www.domain.de/file2.zip");}
elseif ($id=="3")
{$fp=fopen("dlcount.txt","r");
$count=fgets($fp,1024);
fclose($fp);
$fw=fopen("dlcount.txt","w");
$cnew=$count+1;
$countnew=fputs($fw,$count+1);
fclose($fw);
header("location: http://www.domain.de/file3.zip");}
?>