Ejemplo n.º 1
0
 } else {
     if ($isValidYoutube == 1 && $_POST['photoId'] != '') {
         $_POST['video_code'] = '';
         $_POST['video_title'] = '';
         $_POST['video_site'] = '';
         $_POST['video_url'] = 'http://youtu.be/' . $idVideoYoutube . '';
         $_POST['video_thumbnail'] = '';
     } else {
         if ($isValidVimeoURL == 1 && $_POST['photoId'] == '') {
             $dataVideo = $dataVideoVimeo->{'title'} . ' (Vimeo) ';
             $typeMedia = $_SESSION['LANG']['video'];
             $icon = '<i class="video_img_sm icons"></i>';
             $_POST['video_code'] = $dataVideoVimeo->{'video_id'};
             $_POST['video_title'] = $dataVideoVimeo->{'title'} . ' (Vimeo) ';
             $_POST['video_site'] = 'vimeo';
             $_POST['video_url'] = _Function::bitLyUrl('http://vimeo.com/' . $dataVideoVimeo->{'video_id'} . '');
             $_POST['video_thumbnail'] = preg_replace('/(\\_640|\\_1280+)/', '_200', $dataVideoVimeo->{'thumbnail_url'});
         } else {
             if ($isValidVimeoURL == 1 && $_POST['photoId'] != '') {
                 $_POST['video_code'] = '';
                 $_POST['video_title'] = '';
                 $_POST['video_site'] = '';
                 $_POST['video_url'] = 'http://vimeo.com/' . $dataVideoVimeo->{'video_id'} . '';
                 $_POST['video_thumbnail'] = '';
             } else {
                 if ($isValidDailymotionURL === 1) {
                     $htmlDailymotion = $dataDailymotion->{'html'};
                     $xpath = new DOMXPath(@DOMDocument::loadHTML($htmlDailymotion));
                     $urlDaily = $xpath->evaluate("string(//iframe/@src)");
                     $urlDaily = str_replace('\\', '', $urlDaily);
                     $urlDaily = str_replace('"', '', $urlDaily);