WEB Need a file hosting script that will purge files that aren't used in ~30 days

Discussion in 'OT Technology' started by Jesse, Aug 24, 2008.

  1. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Recommendations? Want to setup something like flyupload.com minus all the gay.

    My server is limited to 80gb so I need something that will purge old shit automatically. Also would prefer to be able to configure shit like how many concurrent connections per IP, etc.

    Not looking to have someone write one either.
     
  2. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    I'd offer to write one but I only know how to do scripts for 81GB servers, sorry :sad2:
     
  3. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    You had to try pretty hard to find something wrong with my description to try to make a joke. You probably should have tried a bit harder though.
     
  4. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    you could set it up to "access" a file (if it doesn't do it already) whenever one is used.. then all you need is a cron job to run at midnight and delete all files that haven't been accessed in 30 days

    or a more sophisticated script would keep a table of access counts and dates.. then set up a cron to delete all files past the expiration date and also if your free space drops to a certain percentage start purging the files that have the lowest access counts
     
  5. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    I wasn't trying to find anything wrong.. :confused:

    chill out, bropsicle
     
  6. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    :rofl:
    I want it to have an error message saying it deleted the file, as well as a page displaying the file. Something I can use to force people to click the links from the page, but not do referer checking kinda thing. This way more people can download, and there will be less bitching about my current setup.
     
  7. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    having an error page mention that the file was deleted.. not just that it doesn't exist.. should be pretty simple. if all you keep in a table is last date of access.. then when the cron job or whatever else deletes the file.. just change the date to 0 or -1 or something, and then check for that on the error page to know if it was deleted.

    I'm not sure I know what you mean about the rest of it.. but I think most of the bitching now is that people just don't like the giant bobbing unicorn cock all over their screen just cause they forgot to click "here" before the page forwarded :mamoru:
     
  8. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    When I post threads on OT I usually use the link that won't redirect auto, but they will have to click the here to move on. Just, some browsers don't send the referer, which is the main problem.
     
  9. intrktevo

    intrktevo New Member

    Joined:
    Oct 18, 2004
    Messages:
    5,781
    Likes Received:
    0
    Location:
    UCF
    find a premade on, and just write a quick php script that pruns files via a cron job
     
  10. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Well, recommend me one. Pretty much just want one that uses SQL and has direct file access protection.
     

Share This Page