Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Plain Text by Avinash ( 15 years ago )
$exts=array(".3gp", ".3g2", ".asf", ".avi", ".dat", ".divx", ".dsm", ".evo", ".flv", ".m1v", ".m2ts", ".m2v", ".m4a", ".mj2", ".mjpg", ".mjpeg", ".mkv", ".mov", ".moov", ".mp4", ".mpg", ".mpeg", ".mpv", ".nut", ".ogg", ".ogm", ".qt", ".swf", ".ts", ".vob", ".wmv", ".xvid");
function vidlist($d)
{
$results = array();
$handler = opendir($d);
while ($file = readdir($handler))
{
if ($file != '.' && $file != '..')
{
if(is_dir($d.$file))
vidlist($d.$file.trim(" \ "));
elseif (strrchr($file,'.')!="")
{
$ext=strtolower(strrchr($file,'.'));
if ($file != '.' && $file != '..' && in_array($ext,$GLOBALS["exts"]))
{
$results[] = $d.$file;
}
}
}
}
closedir($handler);
//sort($results);
//print_r($results);//this line returns result
return $results;
}
Revise this Paste