데모
<?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년 전 | 635 | ||
| 7629 |
|
10년 전 | 2345 | |
| 7628 | 10년 전 | 768 | ||
| 7627 |
|
10년 전 | 999 | |
| 7626 |
|
10년 전 | 1758 | |
| 7625 | 10년 전 | 659 | ||
| 7624 | 10년 전 | 681 | ||
| 7623 |
|
10년 전 | 3005 | |
| 7622 | 10년 전 | 691 | ||
| 7621 |
leeleeleelee
|
10년 전 | 567 | |
| 7620 | 10년 전 | 527 | ||
| 7619 | 10년 전 | 455 | ||
| 7618 | 10년 전 | 995 | ||
| 7617 | 10년 전 | 713 | ||
| 7616 | 10년 전 | 609 | ||
| 7615 | 10년 전 | 706 | ||
| 7614 | 10년 전 | 1209 | ||
| 7613 |
|
10년 전 | 2050 | |
| 7612 | 10년 전 | 1121 | ||
| 7611 | 10년 전 | 1385 | ||
| 7610 |
|
10년 전 | 1874 | |
| 7609 |
|
10년 전 | 1290 | |
| 7608 |
mwdkim
|
10년 전 | 1093 | |
| 7607 |
|
10년 전 | 1021 | |
| 7606 |
mwdkim
|
10년 전 | 3900 | |
| 7605 | 10년 전 | 667 | ||
| 7604 | 10년 전 | 1002 | ||
| 7603 | 10년 전 | 1627 | ||
| 7602 |
|
10년 전 | 1041 | |
| 7601 |
AniNest
|
10년 전 | 2761 | |
| 7600 |
port443
|
10년 전 | 997 | |
| 7599 | 10년 전 | 918 | ||
| 7598 | 10년 전 | 990 | ||
| 7597 | 10년 전 | 4551 | ||
| 7596 |
SeungYeon
|
10년 전 | 866 | |
| 7595 |
untitled
|
10년 전 | 2390 | |
| 7594 |
프로그래머7
|
10년 전 | 1700 | |
| 7593 |
untitled
|
10년 전 | 2337 | |
| 7592 |
untitled
|
10년 전 | 1910 | |
| 7591 |
untitled
|
10년 전 | 2650 | |
| 7590 |
아리마2001
|
10년 전 | 822 | |
| 7589 | 10년 전 | 1079 | ||
| 7588 |
|
10년 전 | 2898 | |
| 7587 | 10년 전 | 1273 | ||
| 7586 | 10년 전 | 637 | ||
| 7585 | 10년 전 | 1660 | ||
| 7584 | 10년 전 | 1392 | ||
| 7583 |
leeleeleelee
|
10년 전 | 1135 | |
| 7582 |
|
10년 전 | 1072 | |
| 7581 | 10년 전 | 1302 | ||
| 7580 | 10년 전 | 943 | ||
| 7579 |
|
10년 전 | 582 | |
| 7578 | 10년 전 | 1397 | ||
| 7577 |
|
10년 전 | 1851 | |
| 7576 | 10년 전 | 1368 | ||
| 7575 |
멋진남자임
|
10년 전 | 1447 | |
| 7574 | 10년 전 | 2086 | ||
| 7573 | 10년 전 | 3217 | ||
| 7572 | 10년 전 | 745 | ||
| 7571 |
|
10년 전 | 771 | |
| 7570 |
|
10년 전 | 1293 | |
| 7569 | 10년 전 | 1523 | ||
| 7568 |
this1mg
|
10년 전 | 1022 | |
| 7567 |
|
10년 전 | 729 | |
| 7566 | 10년 전 | 895 | ||
| 7565 |
Angel하늘
|
10년 전 | 965 | |
| 7564 |
seoldi
|
10년 전 | 1203 | |
| 7563 |
|
10년 전 | 1350 | |
| 7562 |
멋진남자임
|
10년 전 | 2046 | |
| 7561 | 10년 전 | 681 | ||
| 7560 |
leeleeleelee
|
10년 전 | 880 | |
| 7559 | 10년 전 | 5010 | ||
| 7558 |
RinaP
|
10년 전 | 754 | |
| 7557 |
|
10년 전 | 1219 | |
| 7556 | 10년 전 | 1170 | ||
| 7555 |
hyohyojj1234
|
10년 전 | 1634 | |
| 7554 | 10년 전 | 1073 | ||
| 7553 |
senseme
|
10년 전 | 1321 | |
| 7552 |
ehdltdoit
|
10년 전 | 1413 | |
| 7551 |
|
10년 전 | 1797 | |
| 7550 |
leeleeleelee
|
10년 전 | 1563 | |
| 7549 | 10년 전 | 2394 | ||
| 7548 | 10년 전 | 1814 | ||
| 7547 |
멋진남자임
|
10년 전 | 1927 | |
| 7546 | 10년 전 | 965 | ||
| 7545 |
ILMare1003
|
10년 전 | 1257 | |
| 7544 |
|
10년 전 | 1211 | |
| 7543 | 10년 전 | 863 | ||
| 7542 | 10년 전 | 636 | ||
| 7541 |
울라라라우
|
10년 전 | 849 | |
| 7540 | 10년 전 | 1580 | ||
| 7539 | 10년 전 | 901 | ||
| 7538 |
|
10년 전 | 1813 | |
| 7537 | 10년 전 | 3588 | ||
| 7536 |
Gaumi
|
10년 전 | 1386 | |
| 7535 |
프로그램은어려워
|
10년 전 | 1243 | |
| 7534 |
senseme
|
10년 전 | 1192 | |
| 7533 | 10년 전 | 1172 | ||
| 7532 | 10년 전 | 834 | ||
| 7531 | 10년 전 | 2027 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기