Soundcloud 嵌入仅从页面 URL 检索,可能吗?

问题描述 投票:0回答:1

我能够像这样检索视频嵌入:

iframe style='overflow: hidden; border: 0; width: 720px; height: 506px' src='http://stagevu.com/embed?
width=720&amp;height=450&amp;background=000&amp;uid=ymuqokfxatwt' scrolling='no'></iframe> 

当用户以如下形式输入视频的简单 URL 链接时: http://stagevu.com/video/ipfmdyadiqgt,使用以下代码:

// code to display StageVu
if (preg_match("/http:\/\/stagevu.com\/video\/([a-z]*)/i", $url, $matches)) {
return '<iframe style="overflow: hidden; border: 0; width: 700px; height: 400px"
   src="http://stagevu.com/embed?width=700&amp;height=400&amp;background=000& amp;uid='
   .$matches[1]. '" scrolling="no">'.
'</iframe>';
}

我想知道这样的链接:https://soundcloud.com/darkelixir/teknian-behemoth-darkelixir

像这样疯狂的嵌入:

iframe width="100%" height="166" scrolling="no" frameborder="no"
  src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F80432122"> 
  </iframe> 

在没有易于使用的 ID 系统的情况下如何允许通过 URL 嵌入?

php mysql soundcloud
1个回答
0
投票

http://developers.soundcloud.com/docs/api/reference#resolve

看看这个,它用于解析 URL!

© www.soinside.com 2019 - 2024. All rights reserved.