【发布时间】:2020-01-07 12:41:04
【问题描述】:
我在域上安装了 URL Shortener (Yourls.org)。 index.php 包含以下代码:
<html>
<head>
<style type="text/css">
html,body{
height: 100%;
min-height: 100%;
margin: 0;
padding: 0;
background-color: #000;
}
</style>
</head>
<body>
<iframe src="//player.vimeo.com/video/<?php echo filter_input(INPUT_GET, 'clipid', FILTER_SANITIZE_NUMBER_INT); ?>?server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1&autoplay=1" width="100%" height="100%" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<?php endif; ?>
</body>
</html>
目的是使用 Vimeo 将剪辑 ID 存储在缩短链接后要解析的链接中(这将如下所示:http://domain/?clipid=8374896345)。 如果要解析的链接与上述不对应,或者仅作为来自 Vimeo 的嵌入视频的视频,则会简单地显示黑屏。
现在的问题是发送短链接时Vimeo没有加载缩略图。
我必须在 index.php 中添加哪些代码(以及在哪里),以便加载缩略图。
我在这里看到了类似的问题:Get img thumbnails from Vimeo? 但我无法获得正确的代码...
有人可以帮我吗?
【问题讨论】:
标签: php vimeo url-shortener yourls