Can anyone pls give me a code to try about registering how many download occurs in my downloadable files?
Download Counter
Started by NightCrawler, Sep 14 2003 09:57 AM
4 replies to this topic
#1
Posted 14 September 2003 - 09:57 AM
#2
Posted 14 September 2003 - 12:36 PM
FS-21's script is good and has the option for muliple files.
This one is used for BlackMissile, it only supports 1 file:
Make a link:
<a href="download.php">BlackMissile Download</a>
The download.php files says:
the counter.txt file says:
and at the bottom of the page put:
This one is used for BlackMissile, it only supports 1 file:
Make a link:
<a href="download.php">BlackMissile Download</a>
The download.php files says:
<?php
$fp=fopen("counter.txt","r+");
flock($fp,1);
$count=fgets($fp,6);
$count+=1;
rewind($fp);
fputs($fp,$count);
flock($fp,3);
fclose($fp);
header ("location: BlackMissile.zip");
exit();
?>
the counter.txt file says:
it must be CHMOD'ed to 666.1
and at the bottom of the page put:
Downloaded <?php include ("counter.txt"); ?> times
#3
Posted 15 September 2003 - 09:57 AM
i didn't notice before that php looks like C/C++.
Anyway thanks for the reply I'll go for the simple one(Detail's Code),its good enough for my need.
I'm sure this is a good resource for everyone!
Anyway thanks for the reply I'll go for the simple one(Detail's Code),its good enough for my need.
I'm sure this is a good resource for everyone!
#4
Posted 15 September 2003 - 09:59 AM
i could use one of those when my mod is ready
Become the Ultimate General - Mod Demo is Available!
Prepare your weapons technology against the worlds most powerful generals.
FREEDOM STUDIOS: http://www.freedomstudios.net
Prepare your weapons technology against the worlds most powerful generals.
FREEDOM STUDIOS: http://www.freedomstudios.net
#5
Posted 14 October 2003 - 08:03 PM
thx, ive been looking for a code like this for a while now, thx and ill use detail's easier one
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users