Php File Upload and Download Script Free

Php File Upload and Download Script Free, includes file manager and cart system integrated with Upload form and File downloading. Easy-to-use, based on php and mySQL. Admin can upload any type of file (exe, zip, mp3 and so on), users can see thumbnails of uploaded files and download files in one single ZIP file.

We are glad to present you a File Upload and Download Script Free . This is a free script that will help you in this matter. It’s good PHP file upload and download script that allows you to upload and download multilevel files .  

Descriptive multi image uploader

This is an script that consists of a PHP multiple image uploader powered by the jQuery library. You can change the description of the images and its ordering for later use. You can also delete the images and preview them by clicking on the thumbnail. If this wasn’t enough, this image uploader is fully responsive!! Note: a MySQL table is required to store the details of the images. (The table creation script is included).

Get secure and private access to the internet

For Individuals or organizations that need secure remote access via VPNWe help companies keep their networks and Internet connections secure. Our VPN service adds an extra layer of protection to secure your communications. We do this by applying strong encryption to all incoming and outgoing traffic so that no third parties can access your confidential information. Protect your organization against security breaches. Secure remote team access. Simplify business network security. Access region-specific online content from anywhere in the world.

PHP Multifile Uploader with Progress Bar

The PHP Multifile Upload script provided here is extremely easy to install. It allows the upload of multiple files at a time and shows the progress with a customizable AJAX progress bar. The HTML form which comes with the script allows to dynamically add inputs for new files. The script comes with detailed instructions how to configure PHP correctly for file uploads.

File upload script

Free source code for file upload in PHP and MySQL. This free students project can also performs the operations like, File uploading, File downloading & store file in a particular folder. This free PHP project was developed with all advanced features like JQuery functioning, CSS style sheets, JavaScript and MySQL database for connectivity. Engineering, Arts and Science, Diploma & MCA students can use this PHP source code for their final year projects. And also PHP beginners and professionals can use this project. We have a special section for PHP mini projects free download.

Secure Image Uploader

Upload Systems Secure Image Uploader is a 100% secure image uploader class. It validates the image file 3 times, 2 validations are well known around the web that still leaves a vulnerability and 1 validation is my implementation to cover those vulnerabilities and all types of vulnerabilities due to the integrity checking of the image file.

Console Component

Create testable command line interfaces, The Console component eases the creation of beautiful and testable command line interfaces. The Console component allows you to create command-line commands. Your console commands can be used for any recurring task, such as cronjobs, imports, or other batch jobs. If you install this component outside of a Symfony application, you must require the vendor/autoload.php file in your code.

BeDrive – File Sharing and Cloud Storage

byVebto in Loaders And Uploaders

  • Software Version: PHP 7.x
  • Software Framework: Laravel

File Types Included:

  • JavaScript JS
  • JavaScript JSON
  • HTML
  • CSS
  • LESS
  • PHP
  • Layered PSD

Simple HTML Form to Upload File In PHP

This is a simple HTML form with file input field and a submit button.PHP

123456789      <form class=”form-signin” method=”POST” enctype=”multipart/form-data”>        <h2 class=”form-signin-heading”>Upload File</h2>   <div class=”form-group”>     <label for=”InputFile”>File input</label>     <input type=”file” name=”file” id=”InputFile”>     <p class=”help-block”>Upload JPEG Files that are below 100 KiloBytes</p>   </div>        <button class=”btn btn-lg btn-primary btn-block” type=”submit”>Upload</button>      </form>

Adding Bootstrap Default Styles

Add these style sheets in the head section of your HTML File to load bootstrap style.XHTML

12345678910<!– Latest compiled and minified CSS –><link rel=”stylesheet” href=”” > <!– Optional theme –><link rel=”stylesheet” href=”” > <link rel=”stylesheet” href=”styles.css” > <!– Latest compiled and minified JavaScript –><script src=””></script>

Adding Custom Styles to Upload Form

Add these styles into a style sheet and save the file as styles.css.CSS

12345678910111213141516171819202122232425262728293031323334353637383940body {  padding-top: 40px;  padding-bottom: 40px;  background-color: #eee;} .form-signin {  max-width: 330px;  padding: 15px;  margin: 0 auto;}.form-signin .form-signin-heading,.form-signin .checkbox {  margin-bottom: 10px;}.form-signin .checkbox {  font-weight: normal;}.form-signin .form-control {  position: relative;  height: auto;  -webkit-box-sizing: border-box;     -moz-box-sizing: border-box;          box-sizing: border-box;  padding: 10px;  font-size: 16px;}.form-signin .form-control:focus {  z-index: 2;}.form-signin input[type=”email”] {  margin-bottom: -1px;  border-bottom-right-radius: 0;  border-bottom-left-radius: 0;}.form-signin input[type=”password”] {  margin-bottom: 10px;  border-top-left-radius: 0;  border-top-right-radius: 0;}

Uploading File into Server

Before Uploading File into Server, we should know about $_FILES super global. By using this $_FILES super global we need to access some information from the uploaded file.

We should know the name of the uploaded file. And the size of the file, extension of the file that is being uploaded. And the temporary location of the file uploaded. Below is the information

We can read name of the file $_FILES[‘name-of-file-field’][‘name’]

We can get the size of the file $_FILES[‘name-of-the-field’][‘size’]. This file size is in bytes.

We can get the type of the file $_FIELS[‘name-of-the-field’][‘type’] . This is file type that is image, video or any other file type.

We can get the file’s temporary uploaded location by $_FILES[‘name-of-file-field’][‘tmp_name’]. We are going to use this information to move the uploaded file into our desired directory.PHP

1234$name = $_FILES[‘file’][‘name’];$size = $_FILES[‘file’][‘size’];$type = $_FILES[‘file’][‘type’];$tmp_name = $_FILES[‘file’][‘tmp_name’];

Till Now we have seen the basics, let’s get into the script.

Checking to see that if the file name is set and not empty. Then setting a directory variable, and moving file from temporary location to our desired location.PHP

12345678910if(isset($name) && !empty($name)){ $location = “uploads/”; if(move_uploaded_file($tmp_name, $location.$name)){ $smsg = “Uploaded Successfully”; }else{ $fmsg = “Failed to Upload File”; }}else{ $fmsg = “Please Select a File”;}

By using move_uploaded_file function, we are successfully uploading the file.

Next we need to add the validations or restrictions based on the file type and also based on the size.

Restrict File Upload size while Uploading in PHP

We can achieve this by simply writing an if else condition, we will use the file size from Files superglobal. Before doing this we should define a variable with maximum file size, here I’m using 100kb as my maximum file size. You can increase this to your need.PHP

1$max_size = 100000;

Add this condition inside the first if statement, below is the code.PHP

1234567891011121314if(isset($name) && !empty($name)){ if(($extension == $size<=$max_size){ $location = “uploads/”; if(move_uploaded_file($tmp_name, $location.$name)){ $smsg = “Uploaded Successfully”; }else{ $fmsg = “Failed to Upload File”; } }else{ $fmsg = “File size should be 100 KiloBytes”; }}else{ $fmsg = “Please Select a File”;}

Restrict File Upload based on Extension While Uploading

For restricting file uploads based on the extensions, it’s tricky but not that’s complicated. First of all, we need to read the file extension. For that We will write PHP code do this function, we will remove everything in front of the period and also the period in the file name. So, the remaining part is the is the file extension.

We can get the output by using two functions, one is strpos and the another one is substr.PHP

1$extension = substr($name, strpos($name, ‘.’) + 1);

Add the condition to check the file extension inside the filename checking condtion. We can use these conditions in combination with file size restriction condition.PHP

1234567891011121314if(isset($name) && !empty($name)){ if(($extension == “jpg” || $extension == “jpeg”) && $type == “image/jpeg” && $extension == $size<=$max_size){ $location = “uploads/”; if(move_uploaded_file($tmp_name, $location.$name)){ $smsg = “Uploaded Successfully”; }else{ $fmsg = “Failed to Upload File”; } }else{ $fmsg = “File size should be 100 KiloBytes & Only JPEG File”; }}else{ $fmsg = “Please Select a File”;}

Displaying Success and Failure Messages in PHP File Upload Script

I’ve already defined failed message variable as fmsg and sucess message variable as smsg, you can use this below code to print the messages. Add this code inside the form opening tag.PHP

12<?php if(isset($smsg)){ ?><div class=”alert alert-success” role=”alert”> <?php echo $smsg; ?> </div><?php } ?><?php if(isset($fmsg)){ ?><div class=”alert alert-danger” role=”alert”> <?php echo $fmsg; ?> </div><?php } ?>


A fully functional PHP file upload and download script, which supports file upload/download, multiple user groups with limited access, storing file using mysql database, downloading and viewing files via a browser based interface.


No Comment.