How to pass the local film through php?

I"d like to check,
how to pass the local film through the php video?
suppose I have a profile that is full of slices
but how can I buy each slice via php without changing the name of the clip?
I can read, but only for uploading.
I really don"t know how to upload a file in batches locally.
is there a big god who understands this train of thought?

neither the file name nor the film name does not change
the only thing that will be affected is size
this. Is it possible?


The general idea of

is as follows (I did this before to compress local images), which is actually using php's GD library

<?php
set_time_limit(0);
$p = getDir('code/');
 
foreach($p as $val){
        //$file = "images/3.jpg";
        //header("Content-type: image/jpeg");
        $file_type = substr(strrchr($val,"."),1);
        if ($file_type == 'jpg' || $file_type == 'png' || $file_type == 'gif') {
                $percent = 1;  //
                list($width, $height, $type) = getimagesize($val); //
                //
                $newwidth = $width * $percent;
                $newheight = $height * $percent;
                switch($type){ 
                        case 1:
                                $src_im = imagecreatefromgif($val);
                                break;
                        case 2:
                                $src_im = imagecreatefromjpeg($val);
                                break;
                        case 3:
                                $src_im = imagecreatefrompng($val);
                                break;
                        default:
                                break;
                }
                $dst_im = imagecreatetruecolor($newwidth, $newheight);
                imagecopyresized($dst_im, $src_im, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
                imagejpeg($dst_im,$val); //
                imagedestroy($dst_im);
                imagedestroy($src_im);
        }
}
echo '';
 
 
function searchDir($path,&$data){
if(is_dir($path)){
$dp=dir($path);
while($file=$dp->read()){
if($file!='.'&& $file!='..'){
searchDir($path.'/'.$file,$data);
}
}
$dp->close();
}
if(is_file($path)){
$data[]=$path;
}
}
 
 
function getDir($dir){
$data=array();
searchDir($dir,$data);
return   $data;
}
 
 
?>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb1eae-5d1af.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb1eae-5d1af.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?