케빈엉클

유튜브/비메오 ID 갖고오기 (at list.skin.php)

· 2025-02-27 (목) 13:58:00 · 5510

[code]

//YOUTUBE

$videoId = get_youtube_id($list[$i]['wr_content']);

                            $youtube_thumbnail = get_youtube_thumbnail(get_youtube_id($list[$i]['wr_content']));                            

                            if($youtube_thumbnail) {

                                //$img_content = '<img src="'.$youtube_thumbnail.'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';

                                $img_content = "";

                                echo '<iframe width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'" src="https://www.youtube.com/embed/'.$videoId.'?control=0" frameborder="0" allowfullscreen></iframe>';                                                                                                  

                            }

 

//VIMEO

$videoIdofvimeo = get_vimeo_id($list[$i]['wr_content']);

                            $vimeo_thumbnail = get_vimeo_thumbnail(get_vimeo_id($list[$i]['wr_content']));

                            if($vimeo_thumbnail) {

                                $img_content = "";

                                echo '<iframe width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'"

                                    src="https://player.vimeo.com/video/'.$videoIdofvimeo.'"

                                    frameborder="0"

                                    allow="autoplay; fullscreen; picture-in-picture"

                                    allowfullscreen></iframe>';

                            }

[/CODE]

단, youtube.lib.php이 lib에 folder에 있어야 합니다.

댓글을 작성하시려면 로그인이 필요합니다.
+
제목 글쓴이 날짜 조회
25-02-27 조회 5,511
25-02-27 조회 5,752
25-02-27 조회 5,854
25-02-24 조회 5,942
25-02-22 조회 5,879
25-02-21 조회 6,401
25-02-20 조회 6,756
25-02-20 조회 6,597
25-02-19 조회 6,240
25-02-14 조회 5,980
25-02-10 조회 6,436
25-02-08 조회 5,782
25-02-07 조회 6,531
25-02-03 조회 5,941
25-02-02 조회 5,678
25-02-02 조회 5,839
25-02-01 조회 5,942
25-01-29 조회 5,827
25-01-29 조회 5,557
25-01-29 조회 5,623
25-01-23 조회 5,862
25-01-20 조회 5,884
25-01-19 조회 5,877
25-01-17 조회 6,321
25-01-16 조회 5,917
25-01-14 조회 6,287
25-01-14 조회 5,885
25-01-14 조회 5,576
25-01-13 조회 5,798
25-01-11 조회 6,292