Download script?

Discussion in 'OT Technology' started by Mourning Wood, Jan 7, 2005.

  1. Mourning Wood

    Mourning Wood New Member

    Joined:
    Jul 13, 2004
    Messages:
    2,755
    Likes Received:
    0
    Anyone have a script to limit the number of downloads for a file on my web space? Php, whatever :x:

    I have bandwidth to use up, but don't want to go over the limit and face charges. I'd like to limit the number of times a file can be downloaded.

    I tried searching but couldn't find anything :hsugh:
     
  2. Shibboleth

    Shibboleth teh mad Plato skillz

    Joined:
    Sep 29, 2004
    Messages:
    1,769
    Likes Received:
    0
    if you're using dreamhost they offer bandwidth throttling. Most other hosts should offer the same.
     
  3. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    how do they meter bw? per GB, or per Mbps?

    If it's per Mbps, then you can use mod_throttle in apache.

    If it's per GB, then a quick PHP script will let you set quotas on the # of times it can be downloaded.
     
  4. Mourning Wood

    Mourning Wood New Member

    Joined:
    Jul 13, 2004
    Messages:
    2,755
    Likes Received:
    0
    Yes, I'm using Dreamhost. Thanks, I didn't even see the bandwidth throttling settings before :)

    The only thing I'm wondering about is if I set the throttle to, say, 50gb. It then changes my web directory to mydomain.com.throttled (when 50gb is reached), where I can put a web page that says I've reached my bandwidth limit. So my question is, after that point is my site down until the next billing cycle? Or can I disable throttling and it goes back to normal? Can I throttle again for another 50gb?

    Any feedback is appreciated.
     
  5. Mourning Wood

    Mourning Wood New Member

    Joined:
    Jul 13, 2004
    Messages:
    2,755
    Likes Received:
    0
    Looks like it's in MB? Some is shown in GB though :ugh:

    A PHP script would be cool, but I've never worked with it :hs:

    This is what the bandwidth section looks like:
    [​IMG]
     

Share This Page