Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

download tracking

by pappajaz (Novice)
on Mar 14, 2001 at 22:46 UTC ( [id://64451]=perlquestion: print w/replies, xml ) Need Help??

pappajaz has asked for the wisdom of the Perl Monks concerning the following question:

Heres a interesting question that I'm sure someone has come across before. I have a client that needs to be able to track downloads per user. Each client purchases software and then gets a code to grab a download off the server. He wants it to remove the code from the allowed download codes after the user finishes the download. Also, he wants to be able to allow the user to be able to resume the download if the connection was broken.

I've seen fellow perl monks discussing file length and downloading from the browser side. I was wondering if this can be done from the server side. If anyone can point me in the right direction or suggest some modules that may help, it would be appreciated.

Replies are listed 'Best First'.
Re: download tracking
by merlyn (Sage) on Mar 14, 2001 at 22:51 UTC
    How do you distinguish a user resuming a download from a different user starting a download?

    Remember, HTTP is a connectionless protocol.

    -- Randal L. Schwartz, Perl hacker

      You could log the IP and browser string at the first connection, and subsequent connections would need to match those fields. Not foolproof, but a start.

      The basic principle is that if the user didn't download the entire program, then give them another code or reinstate the same code untill the download is complete.
Re: download tracking
by lhoward (Vicar) on Mar 14, 2001 at 23:02 UTC
    I'm with merlyn in that you can't "really" do that. But how about a hack-around: "authentication codes" are only valid for 24 hours after their first use.
      The point is to not let users give out the code to their friends so that the software can be pirated off the server. I realize that there is nothing to stop them from giving the software to their friends :). To bad the software isn't opensoure,or I wouldn't have this problem.
        Yeah, but a token thats valid for only a limited period of time would prevent the token from spreading too far. Even if you have a one-time use token there's nothing keeing someone from copying the file they downloaded to a friend (or sharing it with gnutella, or putting in on another website as a free download, etc...). So any "piracy control" that works by limiting downloads in inherently flawed.
Re: download tracking
by JP Sama (Hermit) on Mar 15, 2001 at 02:03 UTC
    what about installation from WEB ?
    like smartftp, and many (argh) micr*s*ft things...
    looks like an option to me... the validation code is used to install, and resume - that way, the clientside installation script would know if all went well..
    i know it sounds confuse, and strange... but it's an idea...
    bye

    #!/jpsama/bin/perl -w
    $tks = `mount`;
    $jpsama = $! if $!;
    print $jpsama;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://64451]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-24 16:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found