데모
<?php
//ver1.0 150423 @_untitle_d
$yt_api = ''; //유튜브 API KEY, https://console.developers.google.com/project
function get_video_id($url){}
function youtube_info($id, $part='snippet')
{
global $yt_api;
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://www.googleapis.com/youtube/v3/videos?id={$id}&key={$yt_api}&part={$part}");
curl_setopt($curl, CURLOPT_POST, 0);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$return = curl_exec($curl);
curl_close($curl);
return json_decode($return, true);
}
$tmp_yt = 'http://www.youtube.com/watch?v=yEJ2-VofNCw'; //유튜브 동영상
$return = youtube_info(get_video_id($tmp_yt)); //유튜브 정보
echo "동영상 : ".$tmp_yt."<br>";
echo "제목 : ".$return['items'][0]['snippet']['title']."<br>"; //title
echo "채널명 : ".$return['items'][0]['snippet']['channelTitle']."<br>"; //channelTitle
echo "썸네일 : <img src='".$return['items'][0]['snippet']['thumbnails']['default']['url']."'><br>"; //thumb default
print_r($return);
?>
관련링크
http://untitled.untitle311apyxry1w48.com/lkbmgfh
참고
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7630 | 10년 전 | 691 | ||
| 7629 |
|
10년 전 | 2452 | |
| 7628 | 10년 전 | 832 | ||
| 7627 |
|
10년 전 | 1060 | |
| 7626 |
|
10년 전 | 1816 | |
| 7625 | 10년 전 | 747 | ||
| 7624 | 10년 전 | 759 | ||
| 7623 |
|
10년 전 | 3152 | |
| 7622 | 10년 전 | 768 | ||
| 7621 |
leeleeleelee
|
10년 전 | 615 | |
| 7620 | 10년 전 | 564 | ||
| 7619 | 10년 전 | 533 | ||
| 7618 | 10년 전 | 1067 | ||
| 7617 | 10년 전 | 750 | ||
| 7616 | 10년 전 | 689 | ||
| 7615 | 10년 전 | 753 | ||
| 7614 | 10년 전 | 1292 | ||
| 7613 |
|
10년 전 | 2107 | |
| 7612 | 10년 전 | 1191 | ||
| 7611 | 10년 전 | 1453 | ||
| 7610 |
|
10년 전 | 1928 | |
| 7609 |
|
10년 전 | 1384 | |
| 7608 |
mwdkim
|
10년 전 | 1161 | |
| 7607 |
|
10년 전 | 1089 | |
| 7606 |
mwdkim
|
10년 전 | 3971 | |
| 7605 | 10년 전 | 720 | ||
| 7604 | 10년 전 | 1060 | ||
| 7603 | 10년 전 | 1674 | ||
| 7602 |
|
10년 전 | 1105 | |
| 7601 |
AniNest
|
10년 전 | 2820 | |
| 7600 |
port443
|
10년 전 | 1069 | |
| 7599 | 10년 전 | 974 | ||
| 7598 | 10년 전 | 1046 | ||
| 7597 | 10년 전 | 4597 | ||
| 7596 |
SeungYeon
|
10년 전 | 918 | |
| 7595 |
untitled
|
10년 전 | 2468 | |
| 7594 |
프로그래머7
|
10년 전 | 1759 | |
| 7593 |
untitled
|
10년 전 | 2399 | |
| 7592 |
untitled
|
10년 전 | 1967 | |
| 7591 |
untitled
|
10년 전 | 2706 | |
| 7590 |
아리마2001
|
10년 전 | 884 | |
| 7589 | 10년 전 | 1141 | ||
| 7588 |
|
10년 전 | 2949 | |
| 7587 | 10년 전 | 1334 | ||
| 7586 | 10년 전 | 698 | ||
| 7585 | 10년 전 | 1735 | ||
| 7584 | 10년 전 | 1432 | ||
| 7583 |
leeleeleelee
|
10년 전 | 1198 | |
| 7582 |
|
10년 전 | 1162 | |
| 7581 | 10년 전 | 1389 | ||
| 7580 | 10년 전 | 1043 | ||
| 7579 |
|
10년 전 | 634 | |
| 7578 | 10년 전 | 1453 | ||
| 7577 |
|
10년 전 | 1898 | |
| 7576 | 10년 전 | 1411 | ||
| 7575 |
멋진남자임
|
10년 전 | 1491 | |
| 7574 | 10년 전 | 2156 | ||
| 7573 | 10년 전 | 3291 | ||
| 7572 | 10년 전 | 787 | ||
| 7571 |
|
10년 전 | 805 | |
| 7570 |
|
10년 전 | 1353 | |
| 7569 | 10년 전 | 1575 | ||
| 7568 |
this1mg
|
10년 전 | 1074 | |
| 7567 |
|
10년 전 | 796 | |
| 7566 | 10년 전 | 944 | ||
| 7565 |
Angel하늘
|
10년 전 | 1041 | |
| 7564 |
seoldi
|
10년 전 | 1285 | |
| 7563 |
|
10년 전 | 1425 | |
| 7562 |
멋진남자임
|
10년 전 | 2129 | |
| 7561 | 10년 전 | 752 | ||
| 7560 |
leeleeleelee
|
10년 전 | 942 | |
| 7559 | 10년 전 | 5078 | ||
| 7558 |
RinaP
|
10년 전 | 817 | |
| 7557 |
|
10년 전 | 1275 | |
| 7556 | 10년 전 | 1219 | ||
| 7555 |
hyohyojj1234
|
10년 전 | 1689 | |
| 7554 | 10년 전 | 1117 | ||
| 7553 |
senseme
|
10년 전 | 1369 | |
| 7552 |
ehdltdoit
|
10년 전 | 1461 | |
| 7551 |
|
10년 전 | 1849 | |
| 7550 |
leeleeleelee
|
10년 전 | 1623 | |
| 7549 | 10년 전 | 2455 | ||
| 7548 | 10년 전 | 1863 | ||
| 7547 |
멋진남자임
|
10년 전 | 1984 | |
| 7546 | 10년 전 | 1025 | ||
| 7545 |
ILMare1003
|
10년 전 | 1320 | |
| 7544 |
|
10년 전 | 1275 | |
| 7543 | 10년 전 | 911 | ||
| 7542 | 10년 전 | 690 | ||
| 7541 |
울라라라우
|
10년 전 | 890 | |
| 7540 | 10년 전 | 1621 | ||
| 7539 | 10년 전 | 970 | ||
| 7538 |
|
10년 전 | 1856 | |
| 7537 | 10년 전 | 3644 | ||
| 7536 |
Gaumi
|
10년 전 | 1454 | |
| 7535 |
프로그램은어려워
|
10년 전 | 1306 | |
| 7534 |
senseme
|
10년 전 | 1225 | |
| 7533 | 10년 전 | 1227 | ||
| 7532 | 10년 전 | 902 | ||
| 7531 | 10년 전 | 2092 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기