Simple File Hosting Script
By Brian on Nov 08, 2009 with Comments 28
I’ve made an easy to use file hosting script that is free for download.
It has some nice features such as:
- Allowed file extensions.
- File size limit.
- Generated file names.
- BBcode, IMG code, Url, etc.
- Terms of Conditions
Generated file names on the server are created using the functions rand() and the md5() hash generator. Here is the code:
<?php
$ext = end(explode(".",strtolower(basename($_FILES["file"]["name"]))));
$rand = rand(1000,9999);
$filename = strtolower(basename($_FILES["file"]["name"]));
$filename = md5($rand.$filename);
$md5_name = $filename. "." .$ext;
?>
The script also uses javascript to check for the Terms and Conditions checkbox being checked to make the submit button enabled.
I will be updating this script with more features, but this is meant to be a simple file hosting script. I will later include a download file page.
Here is what the upload form looks like:

Click here to download the script!
Popularity: 18% [?]
Filed Under: Scripts

[...] Simple File Hosting Script By admin | category: Hosting, file hosting | tags: allowed, conditions, file hosting, [...]
mysql database please!
Like a Beginner, I’m often researching on-line for articles that may aid me. Many thanks
Howdy, your site is on air in the radio! Good job mate. Your posts are truly great and bookmarked. Regards
oh well, try again. There’s a stylesheet missing. I can work with CSS but am not expert enough to know which stylesheet is missing. So my question is, having spent a few hours putting together the your-theme files, what stylesheet do I need to get up and running?
I was looking the some useful information that was referred to in the above article in other websites, but this article was the most helpful so far. Thank you.
Nice blog.
Hi, i must say fantastic website you have, i stumbled across it in AOL. Does you get much traffic?
I actually love to examine some posts that have fantastic positive impacts on its reader and benefit by reading such document particularly concerning Gold and also the stock market. I admire these writers in sharing their views and or opinions which could enlighten the mind with the readers.
Very handy in a row and i give rise to found it on behalf of a sustained era,credit so much.
Great post! I started following your blog about a month ago and I like your honesty. Good example to emulate.
If anyone is looking for cheap hosting / domain registration for a new project go to 1and1 (link) They are offering a year of free hosting with 2 FREE domains and unlimited traffic.
I recently came across your blog and have been reading along. I thought I would leave my first comment. I dont know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
Nice stuff on, i’ll be visiting more often
I was just browsing for relevant blog posts for my project research and I happened to stumble upon yours. Thanks for the useful information!
Wow, your site is magnificent. It has great content on what I’m intrigued in. I just favorited it. Keep postin’ please! .
I like the blog, but could not find how to subscribe to receive the updates by email.
Thank you for the information and tips. Being a designer can be a lot of fun.
Just wanted to comment and say that I really like your blog layout and the way you write too. It’s very refreshing to see a blogger like you.. keep it up
Thanks for this, just want to let u know I subscribed to your blog too……thnks
)