function parseVideoEntry($video_id) { $obj= new stdClass; $url = ‘http://gdata.youtube.com/feeds/api/videos/’.$video_id; $categoriesArray = array(); $xml = simplexml_load_file($url); …
function secondsToWords($seconds){ /*** return value ***/ $ret = “”; /*** get the hours ***/ $hours…
ob_start(); passthru(“D:/wamp/www/ffmpeg/ffmpeg.exe -i D:/wamp/www/video5.mp4 2>&1”); $duration = ob_get_contents(); $full = ob_get_contents(); ob_end_clean(); $search = “/Duration.*?([0-9]{1,}):([0-9]{1,}):([0-9]{1,})/”; print_r($duration); $duration = preg_match($search, $duration, $matches, PREG_OFFSET_CAPTURE, 3); print_r($matches); print_r($matches[1][0]);
function parse_youtube($link){ $regexstr = ‘~ # Match Youtube link and embed code (?: # Group to match embed codes (?:<iframe…
$filename = rand(1000, 10000) . str_replace(” “,”-“,$_FILES[“video_thumbnail”][“name”]); require_once(ABSPATH . ‘/wp-load.php’); require_once(ABSPATH . “wp-admin” . ‘/includes/file.php’); require_once(ABSPATH . “wp-admin” . ‘/includes/image.php’);…