Buat folder terlebih dahulu didalam public_html sebagai penyimpanan file
Untuk menyimpan file jenis lain kita tinggal mengganti extensi file di script php dibawah
Index.html
<!DOCTYPE html>
<html>
<body>
<form action="proses.php" method="post" enctype="multipart/form-data">
Select image to upload:
<input type="file" name="UploadFile" id="UploadFile">
<input type="submit" value="Upload Gambar" name="submit">
</form>
</body>
</html>
proses.php
<?php
$var = "video/";
$folder =$var.basename($_FILES["UploadFile"]["name"]);
$FileType = pathinfo($folder,PATHINFO_EXTENSION);
if ($_FILES["UploadFile"]["size"] >9999999999999999){
echo "Maaf, ukuran file terlalu besar.";}
if($FileType != "mp4" &&
$FileType != "mkv" &&
$FileType != "3gp" &&
$FileType != "avi"){
echo "extensi file tidak di dukung";}else{ move_uploaded_file($_FILES["UploadFile"]["tmp_name"], $folder);}?>