【发布时间】:2015-05-09 04:32:38
【问题描述】:
如何使用 PHP 检测并用 iframe 替换文本中的 soundcloud url:
例如:
这个:
https://soundcloud.com/s/eminem-ft-dr-dre-old-time-sake
进入这个:
<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/140068709&color=00aabb&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false"></iframe>
【问题讨论】:
标签: php url iframe preg-replace