$text='some text and text http://soundcloud.com/disclosuremusic/whats-in-your-head some other text http://soundcloud.com/bad-panda-records/indian-wells-04 and again text blabla';
$text = preg_replace('#(?:https?://).soundcloud\.com/([\-a-z0-9_]+/[\-a-z0-9_]+)#siU','<object height="81" width="100%"><param name="movie" value="http://player.soundcloud.com/player.swf?url=$1&g=bb"></param><param name="allowscriptaccess" value="always"></param><embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url=$1&g=bb" type="application/x-shockwave-flash" width="100%"></embed></object> <a href="$1">$1</a>', $text);
试图从文本中预置一个声音云链接,但似乎没有运气。谢谢