[이윰] 비메오 썸네일 추출 올바르게 적용하기
페이지 정보
shadow2fox
516 2 2
2023.04.24 10:45
짧은주소
-
https://yadolee.com/tip/1046 주소복사
평점
본문
📝 비메오 썸네일 추출 올바르게 적용하기
이윰빌더 3,x, 4.x 이용 중 비메오 썸네일 추출이 올바르게 적용되지 않는다면 아래와 같은 소스 수정을 해 보도록 하자.
이윰빌더 3.x : 그누보드5/eyoom/classes/eyoom.class.php,
이윰빌더 4.x : 그누보드5/eyoom/classes/bbs.class.php
를 열어 $output = $this->curl_web_scripping($url);를 검색하고 수정한다.
수정 전
case 'vimeo.com':
preg_match('/\<meta property=\"og:url\"\scontent=\"(?P<vid>[a-zA-Z0-9:\/\._]+)\"/i', $output, $scrapping);
$out['vid'] = $this->get_video_key($this->eyoom_host($scrapping['vid']));
preg_match('/\<meta property=\"og:image\"([^\<\>])*\>/i', $output, $scrapping);
$temp1 = explode('=', htmlspecialchars($scrapping[0]));
$temp2 = explode('/', urldecode($temp1[3]));
$temp3 = explode('_', urldecode($temp2[4]));
$out['imgkey'] = $temp3[0];
return $out;
break;
수정 후
case 'vimeo.com':
preg_match('/\<meta property=\"og:url\"\scontent=\"(?P<vid>[a-zA-Z0-9:\/\._]+)\"/i', $output, $scrapping);
if(array_key_exists("vid", $scrapping)) $out['vid'] = $this->get_video_key($this->eyoom_host($scrapping['vid']));
//preg_match('/\<meta property=\"og:image\"([^\<\>])*\>/i', $output, $scrapping);
//if(isset($scrapping[0])) $temp1 = explode('=', htmlspecialchars($scrapping[0]));
//if(isset($temp1[3])) $temp2 = explode('/', urldecode($temp1[3]));
//if(isset($temp2[4])) $temp3 = explode('_', urldecode($temp2[4]));
//if(isset($temp3[0])) $out['imgkey'] = $temp3[0];
preg_match('/\<meta property=\"og:image\"\scontent=\"(?P<imgsrc>[a-zA-Z0-9:\/\._-]+)\"/i', $output, $scrapping);
if(array_key_exists("imgsrc", $scrapping)) $out['imgkey'] = $scrapping['imgsrc'];
return $out;
break;
$video['img_url'] = "https://i.vimeocdn.com/video/{$video['key2']}.jpg" 검색하고 수정한다.
수정 전
case 'vimeo.com':
$video['img_url'] = "https://i.vimeocdn.com/video/{$video['key2']}.jpg";
break;
수정 후
case 'vimeo.com':
//$video['img_url'] = "https://i.vimeocdn.com/video/{$video['key2']}.jpg";
$video['img_url'] = $video['key2'];
break;
추천인 2
레벨 143
경험치 3,051,721
Progress Bar 14%
- 가입일 : 2015-03-10 12:21:44
- 서명 : 인간에게 가장 큰 선물은
자기 자신에게 기회를 주는 것이다.
- 크리스 가드너, Chris Gardner -
- 자기소개 : There's never a shortcut to happiness.
-
[짤방 게시판] 이오키 마오 - 주간 플레이보이 2024 No.16•172024-06-16
-
[짤방 게시판] 오쿠다 이로하 - 주간 플레이보이 2024 No.16•172024-06-15
-
[짤방 게시판] 오카모토 히나 - 주간 플레이보이 2024 No.16•172024-06-15
-
1 [짤방 게시판] 오가와 아야 - 주간 플레이보이 2024 No.16•172024-06-15
-
1 [짤방 게시판] 토미사토 나오 - 주간 플레이보이 2024 No.16•172024-06-15
-
[공유 자료실] Rufus 4.52024-06-15
-
2 [Web Server Tip] 그누보드(영카트) 5.5.17+22024-06-09
-
1 🔞[짤방 게시판] 키요세 유키 - 주간 플레이보이 2024 No.152024-06-09
-
[이슈와 관심] 결코 진실은 가려지지 않을 거라 생각합니다.2024-05-29
-
[생활 정보] 100원이 넘는 적립 금액은 최초이지 않나 싶네요 고생하셨습니다{이모티콘}2024-04-23
-
[자유 게시판] 부활 곡에 잘 어울릴 듯 한 보이스 컬러네요 동감입니다2024-03-31
-
[생활 정보] 80원의 행복이네요{이모티콘}2024-03-21
-
[자유 게시판] 같은 의견이에요2024-03-14
-
[자유 게시판] 다시 봐도 감동입니다{이모티콘}2024-03-11
-
[자유 게시판] 제가 라이브 시청을 하지 않아야 대활약을 해서 손흥민 선수를 위해 안타깝지만 자제 중입니다{이모티콘} 반더벤 또한 너무 잘하지 않았나 싶었네요2024-03-03
-
[자유 게시판] 하늘구장님 늘 감사드리며 마음을 담아 새해 인사를 전합니다 새해 복 많이 받으세요2024-02-09
댓글2
내사랑님의 댓글
축하합니다. 지뢰폭탄 제거로 26경험치를 획득하였습니다.
하늘구장님의 댓글
축하합니다. 첫 댓글로 14경험치를 획득하였습니다.