private function _getVbox($link) {
$video = '';
$pattern = '#^(?:https?://)?'; # Optional URL scheme. Either http or https.
$pattern .= '(?:www\.)?'; # Optional www subdomain.
$pattern .= '(?:'; # Group host alternatives:
$pattern .= 'zazz\.bg/'; # Either zazz.bg,
$pattern .= '|vbox7\.com'; # or vbox7.com
$pattern .= '(?:'; # Group path alternatives:
$pattern .= '/play:'; # Either /play/,
$pattern .= '|/emb/external\.php\?vid='; # or /watch?other_param&v=
$pattern .= ')'; # End path alternatives.
$pattern .= ')'; # End host alternatives.
$pattern .= '([\w-]{8,12})'; # 10 characters (Length of vbox7 video ids).
$pattern .= '(?:.+)?$#x'; # Optional other ending URL parameters.
preg_match($pattern, $link, $matches);
if(!empty($matches[1])){
$code = $matches[1];
$video = 'http://vbox7.com/emb/external.php?vid='.$code;
}
return $video;
}