/    Sign up×
Community /Pin to ProfileBookmark

download tracking from my site

from my site i want to permit my registered user to download a specific files only once !!

i set the download link :
like [url]http://domain.com/document.zip[/url] [like this]

now i want to deactivate the link after successfull download . how could i perform that ?

there may be disconnect the link when download was going on . or user may be stopped the downloading before 100% download for any action . how could i detect the 100% download ?

any siggestion ?

thanks in advance

to post a comment
PHP

9 Comments(s)

Copy linkTweet thisAlerts:
@resullivanMay 08.2006 — The best way that I could think of doing this is to copy the file using php to a temporary destination that the user has access to. Maybe keep track of this with a database. Once the user has downloaded then delete the temp file. As far as knowing about 100% download I am not sure. I think this would be kind of difficult. You would probably have to do this using a socket. I know you could do this using a socket however I am not sure if their is an easier way.
Copy linkTweet thisAlerts:
@muktaauthorMay 08.2006 — it doesnt matter wheather i put a copy of that file to another location or not ! all i want to make this download only once . for that i need to keep track wheather its downloaded 100% or not . all i need to know the process of download tracking .

any exact ideas ?
Copy linkTweet thisAlerts:
@muktaauthorMay 09.2006 — i dont want to believe this is imposible. may be i dont know the idea. but i'm sure someone must help me in this regard . i'm expecting response from modarators specially(notDog).
Copy linkTweet thisAlerts:
@rch10007May 09.2006 — Are you using a DB for the registered user, I would assume so and if that's the case then add a field named "download_file" or something and set it to 0 and change it to 1 when they download the doc, and then use a query check to see if the field is set to 0 or 1 and either download it or send them a page that says you can only do it once or whatever.

Or you can keep waiting for a moderator!
Copy linkTweet thisAlerts:
@Reli4ntMay 09.2006 — Are you using a DB for the registered user, I would assume so and if that's the case then add a field named "download_file" or something and set it to 0 and change it to 1 when they download the doc, and then use a query check to see if the field is set to 0 or 1 and either download it or send them a page that says you can only do it once or whatever.

Or you can keep waiting for a moderator![/QUOTE]


He's wndering how to guage whether or not a file was completely downloaded. Your method only registers an attempt with no guarantee that the download successfully completed.
Copy linkTweet thisAlerts:
@rch10007May 09.2006 — your right, in that case an if else statement will work with a session variable or a cookie.
Copy linkTweet thisAlerts:
@muktaauthorMay 10.2006 — i only need to trace wheather a file is being downloaded 100% or not ? how i could track it , this doesnt matter for me . pls suggest me a way .
Copy linkTweet thisAlerts:
@HuevoosMay 10.2006 — I'm not sure, and I don't have any knowledge in that area, but from the little I know I think you could use some packet sniffers, again, not sure.
Copy linkTweet thisAlerts:
@The_Little_GuyMay 10.2006 — 
  • 1. Get the users IP address

  • 2. Save it in a database

  • 3. Search the database for their IP

  • 4. If it is in the database, don't let them download

  • 5. If it isn't in the database, let them download


  • Their maybe two problems you may run into with this

    1. If the user doesn't completely finish the download, then their name will stored in the database, and they can't re download.

    2. Their IP address may change, and then they can download the file again.
    ×

    Success!

    Help @mukta spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.20,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...