2097152) {$alert = "The file is too big!"; return;} // avoid server-side scripting $whitelist = array('.zip', '.rar', '.7z', '.jpg', '.gif', '.png', '.bmp', '.txt', '.exe', '.doc', '.xls'); $iswhite = false; foreach ($whitelist as $item) { if (strpos(strtolower($filename), $item) + strlen($item) == strlen($filename)) {$iswhite = true;} } if (!$iswhite) {$filename .= '.txt';} $filer = "uploads/$login/$filename"; $download_destination = getcwd() . "/$filer"; if (move_uploaded_file($_FILES['file']['tmp_name'], $download_destination)) { chmod($download_destination, 0777); append("data/files.dat", ";$filer"); $alert = "The file $filer was successfully uploaded!"; $refresh = true; } else { $alert = "This file cannot be uploaded!"; } } } function sidebar () { global $login; if ($login != "") { echo "

Welcome, $login!


"; } // load file list $c = file_get_contents("data/files.dat"); $files = explode(';', $c); $end = count($files) - 11; if ($end < 0) {$end = 0;} echo "

Recent files:

"; echo ""; } function refresh () { global $alert, $refresh; if ($alert != "") {echo "";} if ($refresh) {echo "";} } // load member list, attempt login validation, etc. initialize(); // register a member register(); // log a member in or out (set cookie) login(); // upload a file upload(); ?> Free File Hosting

Free File Hosting

Welcome to Free File! We offer free file hosting for files up to 2MB!
Instant registration only asks for a name and password!

You can upload any clean file here, up to 2MB.
Files will typically remain on the server until we need to free some space for new files.
Only letters, numbers, hyphens, periods, and underscores are allowed for the filename.
You have to be logged in to upload files.

Upload a file
File

Filename


You can register instantly, for free.
Only letters, numbers, hyphens, and underscores are allowed for the username and password.
You can register multiple accounts.

Register an account
Name

Password

Spam check


You can log in after you have registered.
Leave the form blank to log out.

Log into an account
Name

Password


Free File is a file host created due to the death of file-pasta.com.
It is dedicated to programmers at FreeBasic.net who have been subjected to mediafire ads.
It is hosted by free web hosts, so it may have to move frequently, but it is good for temporary file storage.
If you need help or want to see the source code, you can email the admin.