Home Page
  • May 04, 2025, 11:07:01 am *
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Official site launch very soon, hurrah!



Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

Name:
Email:
Subject:
Message icon:

Bold Italicized Underline Strikethrough | Preformatted Text Left Align Centered Right Align
Insert Image Insert Hyperlink Insert Email Insert FTP Link | Glow Shadow Marquee | Superscript Subscript Teletype | Insert Table Insert Code Insert Quote | Insert Unordered List Insert Ordered List Horizontal Rule | Remove Formatting Toggle View
Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips sealed Undecided Kiss Cry
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
Please stop spamming. Your spam posts are moderated and will never be displayed on the internet. What is eighty-eight minus eighty-six (spell out the answer):
Пожалуйста, прекратите спамить. Ваши спам-сообщения модерируются и никогда не будут отображаться в Интернете. What color is grass.:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Dakusan
« on: October 07, 2009, 12:06:00 pm »


One of the most common requests I get from customers is the ability for their clients to upload files through a web page (HTTP) to the server; so I threw together from scratch[All of the script was written from scratch execept the HumanReadableSize function] a secure and robust script for this in about 6 hours which clocks in at about 360 lines. The single file works on just the directory it resides it, so the file can be uploaded to any directory you want it to work on with no extra hassle.

I know there are a lot of large applications out there for managed file uploading through a web interface, but I decided to make this anyway as it is kind of specific in its goals, being relatively lightweight and working on just a single directory at a time. Also since I made it myself, it’s easier to modify and update for specific clients needs, like direct integration into their website design.


Its main features are:
  • Sorted file listing within the directory
  • Upload files of allowed type (invalid extensions are renamed)
  • Delete and rename files
  • Create and delete user logins
  • Logged in users can change their password
  • All features are toggleable in three tiers:
    • No user file found (Directory access is currently unrestricted)
    • Normal user
    • Admin user
  • Easy basic configuration through a short variable list at the top of the file. Once it is configured the first time for a website, it is unlikely the configuration would need to be changed when copying (or symbolic linking) the file to other directories.