Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Need Stript allows upto 5 downloads per zip file, then no more downloads for 24 hours
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Need Stript allows upto 5 downloads per zip file, then no more downloads for 24 hours

painfreepcpainfreepc Member
edited October 2017 in Requests

Need Stript allows upto 5 downloads per zip file, then no more downloads for 24 hours,

it's just zip files in a directory apache page, open access to anyone

Server: Linux Centos 7, Apache, MySQL, PHP 5.6.31, iptables, fail2ban,

Sing Xeon X5680 12/24 cores 3.33/3.60 GHz - 24GB RAM

so I don't think a resource hog php script will be a problem,

I found this Limit the number of downloads per client

may be it can be modded..

Thanked by 1TDD
«13

Comments

  • @painfreepc said:
    Need Stript allows upto 5 downloads per zip file, then no more downloads for 24 hours,

    I found this Limit the number of downloads per client

    may be it can be modded..

    I don’t want to sound rude, but seriously?

  • MasonRMasonR Community Contributor
    edited October 2017

    I think much more information is needed here to help you out.

    For example:

    What's your web stack? LAMP, LEMP, JOLT, etc.

    What language is your webapp using? PHP (aka the devil), Java, Python, etc.

    How do users access the zip file? Password protected, token-based, open access to anyone, etc.

    Provide as many details as possible and maybe someone will help you come up with a solution.

    Edit: Also, this is probably more of a StackOverflow question once you've actually defined your problem more.

  • painfreepcpainfreepc Member
    edited October 2017

    @MasonR said:
    I think much more information is needed here to help you out.

    For example:

    What's your web stack? LAMP, LEMP, JOLT, etc.

    What language is your webapp using? PHP (aka the devil), Java, Python, etc.

    How do users access the zip file? Password protected, token-based, open access to anyone, etc.

    Provide as many details as possible and maybe someone will help you come up with a solution.

    it's just zip files in a directory apache page, open access to anyone

    Server: Linux Centos 7, Apache, MySQL, PHP 5.6.31, iptables, fail2ban,

    Sing Xeon X5680 12/24 cores 3.33/3.60 GHz - 24GB RAM

    so I don't think a resource hog php script will be a problem,

  • @painfreepc

    Honestly, I'd actually charge $ to write you a script that does that for you. Copy-pasting your original post just makes me feel like you're incompetent.

  • hzrhzr Member

    FlamesRunner said: Honestly, I'd actually charge $ to write you a script that does that for you. Copy-pasting your original post just makes me feel like you're incompetent.

    It's probably for his shitty piracy site too.

    Thanked by 1Aidan
  • You can do it via PHP. Easiest solution would be to use woocommerce.

    Python or nodejs will work as well.

  • painfreepcpainfreepc Member
    edited October 2017

    @hzr said:
    It's probably for his shitty piracy site too.

    I don't have a piracy site,

    Read my lips,"No Media Files On My Server and No Links to Media Files"

    if i tell you how to make a bong am i a drug dealer?

  • don't understand why people on LET think I am stupid, I see many ways to limit bandwidth,

    I don't wish to limit BW,

    just limit downloaders to 5 zip files per server every 24 hours..

  • Simple is that I can give you the logic but if you want pure code then learn first.

    Create random string assign to user add one more var like limitation number,

    If everything goes through simple allow file download.

  • Simple is that I can give you the logic but if you want pure code then learn first.

    Create random string assign to user add one more var like limitation number,

    If everything goes through simple allow file download.

  • hzrhzr Member

    painfreepc said: I don't have a piracy site,

    Read my lips,"No Media Files On My Server and No Links to Media Files"

    if i tell you how to make a bong am i a drug dealer?

    You and I both know what you do. You've been somewhat of a douche virtually every single begging post on LET.

    That being said, https://pastebin.com/raw/CBaYZbcx

  • @vishalpatelz said:
    Simple is that I can give you the logic but if you want pure code then learn first.

    Create random string assign to user add one more var like limitation number,

    If everything goes through simple allow file download.

    I am a cook, when friends ask how to make a certain dish.

    I should tell them to go to culinary school..

  • @painfreepc said:

    @vishalpatelz said:
    Simple is that I can give you the logic but if you want pure code then learn first.

    Create random string assign to user add one more var like limitation number,

    If everything goes through simple allow file download.

    I am a cook, when friends ask how to make a certain dish.

    I should tell them to go to culinary school..

    In your case, if a friend asks how to cook certain disk, do you prepare and send it to them. No, right?

    He gave you recipes, use it.

  • @jetchirag said:

    @painfreepc said:

    @vishalpatelz said:
    Simple is that I can give you the logic but if you want pure code then learn first.

    Create random string assign to user add one more var like limitation number,

    If everything goes through simple allow file download.

    I am a cook, when friends ask how to make a certain dish.

    I should tell them to go to culinary school..

    In your case, if a friend asks how to cook certain disk, do you prepare and send it to them. No, right?

    He gave you recipes, use it.

    I have prepared food for friends,

    vishalpatelz did not give me a recipe, he give me a cookbook.

  • FalzoFalzo Member
    edited October 2017

    so you have an apache and use directory listing to have people access your files.
    now you want to limit that...

    there simply is no (feasible) way without changing the whole way of accessing the files first.
    you most likely need to search for stripts elsewhere.

    Thanked by 1vedran
  • hzrhzr Member

    No, he gave you a recipe.

  • painfreepcpainfreepc Member
    edited October 2017

    @Falzo said:
    so you have an apache and use directory listing to have people access your files.
    now you want to limit that...

    there simply is no (feasible) way without changing the whole way of accessing the files first.
    you most likely need to search for stripts elsewhere.

    directory listing is how the client app access the files, i have no control over client app,

    i know a few sites that do this, so it can be done..

  • @painfreepc said:

    @Falzo said:
    so you have an apache and use directory listing to have people access your files.
    now you want to limit that...

    there simply is no (feasible) way without changing the whole way of accessing the files first.
    you most likely need to search for stripts elsewhere.

    directory listing is how the client app access the files, i have no control over client app,

    i know a few sites that do this, so it can be done..

    You know a few sites and you mention a client app. Just because you see it happening that way doesn't mean that is how it works behind the scenes without major changes.

    It might be a directory listing they made, but if it is direct access as most of us are thinking of, then it isn't possible without major changes.

    hzr already gave you a script may need adjustments. https://pastebin.com/raw/CBaYZbcx

    His script even has a counter for you.

    if ($downloadCount > 5) { die("You reached 5 downloads in 24 hours."); }

  • i am looking it over now..

  • This kind of stuff is usually posted in freelancer.com and some indian guy gets the job because his bid was the lowest. Then you try to explain him what you want, and he creates something else. And it's a battle where the only barrier is language.

    Then you give up on freelancer.com and try to enslave all of LET to work for you for free, while all they want is $7.

    Thanked by 1Plioser
  • hzrhzr Member

    shit i'd do the whole thing for you professionaly with configuration settings and all at my standard hourly rate after work, but you're probably not willing to pay more than lowend rates

    Thanked by 1WSS
  • @hzr said:
    shit i'd do the whole thing for you professionaly with configuration settings and all at my standard hourly rate after work, but you're probably not willing to pay more than lowend rates.

    you may be surprised at what i would pay,

    even though you have been an A-HOLE to me,

    i have Mother f#$kers using download managers to request many of the same 1/2 MB to 2 MB zips files over and over, it's getting close to costing me BW money..

  • deankdeank Member, Troll

    Oh, wow, people still use download managers? I used to use it like 15 years ago when I was on slow DSL / dialup.

  • WSSWSS Member

    @hzr said:
    shit i'd do the whole thing for you professionaly with configuration settings and all at my standard hourly rate after work, but you're probably not willing to pay more than lowend rates

    I'd just use $_SESSION and a local cache failover which expires every 24 hours. Really not that difficult to do. I'd probably use IP, and the user-agent as a secondary possible (if I cared), and if I see too many of a 'not in the whitelist for a common' client, I'd kick 'em. E.G. cURL/wget/"Download AccelleratorZ", et al.

    A nice addition would be to keep a state of isActive() so if client is downloading now, it can't download anything else. (Don't use this subroutine, I copyrighted it. (C) DONUT STEEL)

  • painfreepcpainfreepc Member
    edited October 2017

    small simple of my log file, this goes on for hours at a time, sometimes only for a few minutes

    restricting ip's will not help, they come back later with a new IP

    What makes people do this, what do they get out of it?

    67.80.213.247 - - [23/Oct/2017:21:19:06 -0400] "HEAD /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 200 
    67.80.213.247 - - [23/Oct/2017:21:19:06 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:06 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:06 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:06 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:06 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:06 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:06 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:06 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:07 -0400] "HEAD /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 200
    67.80.213.247 - - [23/Oct/2017:21:19:07 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:07 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:07 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:07 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:07 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:07 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    67.80.213.247 - - [23/Oct/2017:21:19:07 -0400] "GET /NO-NAME_NO-NAME/NO-NAME.NO-NAME-NO-NAME-3.0.4.zip HTTP/1.1" 206
    
  • WSSWSS Member

    Might as well hire an administrator while you're looking for a coder.

  • deankdeank Member, Troll

    Have you shown to your visitors that you are agitated to see it happen? If so, someone might be doing it to grief you.

  • i am considering letting you guys know what i do,

    some may feel i run a piracy site,

    other may feel its a matter of freedom of information,

    i make this clear again there are no media files on my server..

  • deankdeank Member, Troll

    I doubt people here care what you do. I sure don't. I am simply giving you a possible reason given limited info.

    Thanked by 1vovler
Sign In or Register to comment.