Simple File Hosting Script

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:

filehostingscript

Check out the demo here!

Click here to download the script!

1

Popularity: 18% [?]

0saves
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Filed Under: Scripts

Tags:

RSSComments (28)

Leave a Reply | Trackback URL

  1. 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!

  2. Thanks lots, I’ve found this article very nice!

  3. Jason Thomas says:

    Hello ! Love your blog thanks for sharing it with me. Support local business.

  4. Mark Grandin says:

    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.

  5. Elana Oldani says:

    Hi! I found your blog on Bing.It’s really well written and it helped me a lot.

    Continue the good work!

  6. 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.

  7. Andy says:

    The demo and download does not work.

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.

The tutorials and scripts found on bgallz.org are for training purposes only, use to your discretion.