I want to preg_match but now work need title and duration
//Title
if(preg_match('/previewTitle\'>(.*?)</', $match, $matches_title)) {
$video['title'] = htmlspecialchars_decode(strip_tags(stripslashes($matches_title[1])), ENT_QUOTES);
} else {
$this->errors[] = 'Failed to get video title for '.$video['url'].'!';
if (!$this->debug) continue;
else $debug_e[] = 'TITLE';
}
//Duration
if(preg_match('/label\'>(.*?)</', $match, $matches_duration)) {
$video['duration'] = duration_to_seconds($matches_duration[1]);
} else {
$this->errors[] = 'Failed to get video duration for '.$video['url'].'!';
if (!$this->debug) continue;
else $debug_e[] = 'DURATION';
}
how to choose title ?
how to choose duration ?
I want to preg_match but now work need title and duration
//Title
if(preg_match('/previewTitle\'>(.*?)</', $match, $matches_title)) {
$video['title'] = htmlspecialchars_decode(strip_tags(stripslashes($matches_title[1])), ENT_QUOTES);
} else {
$this->errors[] = 'Failed to get video title for '.$video['url'].'!';
if (!$this->debug) continue;
else $debug_e[] = 'TITLE';
}
//Duration
if(preg_match('/label\'>(.*?)</', $match, $matches_duration)) {
$video['duration'] = duration_to_seconds($matches_duration[1]);
} else {
$this->errors[] = 'Failed to get video duration for '.$video['url'].'!';
if (!$this->debug) continue;
else $debug_e[] = 'DURATION';
}
how to choose title ?
how to choose duration ?