I want a simple script that does the following
Takes two paramaters
a) action
b) file
I want to be able to either
script.php?action=blah&file=blah
and
<?php $action=blah; $file=blah; include script.php; ?>
The script will
If Action=view
then it
reads say dlc.txt
finds the line with $file
the second word is the number of times its downlaoded
output the numver of times
If Action=dl
then
Open dlc.txt
finds the line with $file
increments the count(second line)
redirects to downlaod the file
note: i need it to support dirs like i might
dlc.php?action=dl&file=download/diamond.zip
i also want to be able to call the same file in a directory up eg
<? blah; include ../dlc.php; ?>
or something like that
thx in advance
thankyou
Lathiat