Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Ultimate anti-leech, anti-proxy, anti-bot, CAPTCHA works, link does not (code included)

by taint (Chaplain)
on Apr 19, 2013 at 22:01 UTC ( #1029592=note: print w/ replies, xml ) Need Help??


in reply to Re: Ultimate anti-leech, anti-proxy, anti-bot, CAPTCHA works, link does not (code included)
in thread Ultimate anti-leech, anti-proxy, anti-bot, CAPTCHA works, link does not (code included)

Greetings InfiniteSilence, and thank you for your reply.
Yes, this is the type of thing I'm looking towards right now.
This is why I was looking at File::Temp, as opposed to performing the
operation manually (as you suggested), because that would require additional
"housekeeping" (deleting the files manually via a cron(8) job. Whereas File::Temp
appears to automatically remove (unlink) the file, after the download has completed.
But as I have never used it before, I'm still trying to figure out how to do that.
Copying/associating the session hash to the <tempfilename> might be handy too.
I could really do with a couple of examples tho. But, for now, I'm just reading, reading, reading. :)

Thanks again, for taking the time to respond InfiniteSilence!

--chris

#!/usr/bin/perl -Tw
use perl::always;
my $perl_version = "5.12.4";
print $perl_version;


Comment on Re^2: Ultimate anti-leech, anti-proxy, anti-bot, CAPTCHA works, link does not (code included)
Re^3: Ultimate anti-leech, anti-proxy, anti-bot, CAPTCHA works, link does not (code included)
by BrowserUk (Pope) on Apr 19, 2013 at 22:20 UTC

    Also, rather than copying the files -- which as you say they are large, could be prohibitive -- create symbolic links to them in a public "downloads" directory using your date/time/session/ip/userid/whatever in the name, and then have a background daemon that scans that directory once a minute or hour or 4 hours, and removes the links that have expired.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Greetings BrowserUk, and thank you for the reply.
      Yes. Performing copy/ies does seem a bit inefficient. The files are "mini" Operating systems, intended for various embedded systems. Most are < 120Mb -- but still.
      A search on CPAN for Symlink::Temp yielded no results. Looks like I'll have to create the module myself. File::Symlink && File::Symlink::Temp -- coming soon to a CPAN mirror near you! :)
      Maybe I'll crack open File.pm, and see if I can figure out how I might create a Symlink module
      With some of the properties File::Temp provides. Or am I just wasting my time?

      Thanks again for taking the time to respond BrowserUk.

      --chris

      #!/usr/bin/perl -Tw
      use perl::always;
      my $perl_version = "5.12.4";
      print $perl_version;
        I may have spoken too soon.
        File::Symlink::Atomic appears to be pretty close to solving much of my needs.
        If I could add the UNLINK feature of File::Temp to this, I'd be set!

        --chris

        #!/usr/bin/perl -Tw
        use perl::always;
        my $perl_version = "5.12.4";
        print $perl_version;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1029592]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2014-08-28 06:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (257 votes), past polls