I learned how to process images from the Internet and detected images with fake extensions: {code ...} is there any method similar to getimagesize for detecting audio and video, MP3 and MP4. I learned how to process images from the Internet to detect images with fake extensions:
// Detect forgery public function checkFlag () {$ this-> flag = @ getimagesize ($ this-> fileInfo ['tmp _ name']); if ($ this-> flag) {return true;} else {$ this-> error = "please Upload valid files"; return false ;}}
Is there any method similar to getimagesize for detecting audio and video, MP3 and MP4.
Reply content:
I learned how to process images from the Internet to detect images with fake extensions:
// Detect forgery public function checkFlag () {$ this-> flag = @ getimagesize ($ this-> fileInfo ['tmp _ name']); if ($ this-> flag) {return true;} else {$ this-> error = "please Upload valid files"; return false ;}}
Is there any method similar to getimagesize for detecting audio and video, MP3 and MP4.
$finfo = finfo_open(FILEINFO_MIME);$mimetype = finfo_file($finfo, $inputFileName);
The first 8 bytes can be read.