Make an upload space on your website
Websites nowadays propose an upload space where you can send your small or large files online. This is quite useful when it comes to file sharing transactions online or if you want to store some files and don’t have any other means to do it.
If you have never heard about YouSendIt.com before, it is a website that provides the type of upload by FTP. However, there are now some ways for you to get a free service that you will put up yourself using a PHP code.
Where to get it
This PHP code is available on the website File Thingie from the link
http://www.solitude.dk/filethingie/?q=download. The advantage with this program is that it can allow you to upload multiple files at the same time, to protect them with a password, to rename, move or delete those files and to edit your text in HTML.
What to do
After downloading the file and unzipping it, there are some modifications that you should make to it.
- Step 1: Rename the PHP file ft2.php into index.php
- Step 2: After the indication # Settings - Change as appropriate. See online documentation for explanations. #, you will have to insert the new username and password as indicated below:
define("USERNAME", "my_username");
define("PASSWORD", "my_password");
- Step 3: Then, alter the DIR declaration from define("DIR", ".");
to
define("DIR", "files");
- Step 4: You can also alter the storage capacity by changing define("MAXSIZE", 2000000);
to
define("MAXSIZE", 9999999);
- Step 5: Finally, you can add some more formats that can be uploaded, where it is written define("FILETYPEBLACKLIST", "php phtml php3 php4 php5"); you can change it to
define("FILETYPEBLACKLIST", "php phtml php3 php4 php5 mp3 doc xls");
What to change on your website
Once you have finished with the changes, you should now create a directory to store the files on your website. Note that you should also create a subfolder that will contain the PHP file. Hence, put the index.php file in the sub folder. All you have to do now is to go on
http://votresite.com/stockage to insert your username and password to be able to access this space.