質問

Im displaying random embed links stored in the database. These embeds are linking to some music on mixcloud.com and soundcloud.com servers. But users can delete their music, so some of these embeds can become nonfunctional. For example this mixcloud embed I have in my database:

<iframe frameborder="0" height="200" 
src="//www.mixcloud.com/widget/iframe/?feed=http%3A%2F%2Fwww.mixcloud.com%2Fmeik-sebastien-muller%2Fclickclack%2F&amp;
embed_uuid=3064105d-9dbc-4907-b999-8c7076a19ca8&amp;
stylecolor=&amp;
embed_type=widget_standard&amp;
hide_cover=" 
width="480">
</iframe>

Or soundcloud embed:

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

Is there some way how to check if the music on the server is still there so if the music is already deleted, I can select another embed from database?

正しい解決策はありません

他のヒント

I think It's possible with api,

$.getJSON("https://api.soundcloud.com/tracks/86361501?client_id=0f8fdbbaa21a9bd18210986a7dc2d72c&format=json").error(function() {
   alert("ups, there is an error, that track is not available");
})
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top