Ask about general coding issues or problems here.
Moderators: macek, egami, gesf
How to made a easy script that tells the downloader how many have alredy downloaded a file?
mail me at:
visit me at:
- New php-forum User
- Posts: 13
- Joined: Fri Feb 07, 2003 10:11 am
- Location: Finland
What I do is create a table with 3 fields. id,filename, and hits. When I add a file I put the filename into the db and use this function. It uses the $_GET super global from the ULR and increments the hits field and redirects to download the file.
- Code: Select all
if(!empty($_GET['file']) && $_GET['file'])
$query = 'update filedls set hits = hits +1 where filename = "'.$file.'"';
- Posts: 830
- Joined: Tue Jan 21, 2003 10:42 pm
- Location: Michigan USA
Return to PHP coding => General
Who is online
Users browsing this forum: Google [Bot] and 6 guests