Simple File Hosting Script
November 8, 2009 # 10:15 PM # Scripts # 26 CommentsI’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: 24% [?]

Subscribe RSS
Comment RSS







Thanks for have very wonderful informations. Your word wide web is greatI am impressed by the facts that you have on this weblog. It exhibits how properly you realize this subject. Bookmarked this excellent web page, will appear again for extra. You, my friend, amazing! I discovered just the facts I by now looked for all over the place and just wasn’t able to discover. What a ideal internet site. Such as this webpage your internet site is 1 of my new most-loved.I similar to this info shown and it has offered me some type of ideas to have success for some cause, so maintain up the fine function!
Thanks lots, I’ve found this article very nice!
Hello ! Love your blog thanks for sharing it with me. Support local business.
Really nice article, I have been looking to read something of this nature and your writing has fit the bill perfectly, thanks very much indeed.
Hi! I found your blog on Bing.It’s really well written and it helped me a lot.
Continue the good work!
Most of the times i visit a blog i get disappointed.On the other hand,I could honestly say that you writting is decent and your website solid.