我正在尝试将camtasia /javascript视频嵌入代码转换为wordpress flowplayer短码。
原始代码如下:
<p>The Camtasia Studio video content presented here requires JavaScript to be enabled and the latest version of the Adobe Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Adobe Flash Player by <a href="http://www.adobe.com/go/getflashplayer">downloading here</a>. </p>
var fo = new SWFObject( "http://www.superaffiliatecoachingclub.com/sacconly/utl/modules/sitereviews/compucard/compucard_controller.swf", "csSwf", "640", "535", "8", "#FFFFFF" );
fo.addVariable( "csConfigFile", "http://www.superaffiliatecoachingclub.com/sacconly/utl/modules/sitereviews/compucard/compucard_config.xml" );
fo.addVariable( "csColor" , "FFFFFF" );
fo.addVariable( "csPreloader" , "http://www.superaffiliatecoachingclub.com/sacconly/utl/modules/sitereviews/compucard/compucard_preload.swf" );
if( args.movie )
{
fo.addVariable( "csFilesetBookmark", args.movie );
}
fo.write("flashcontent");我需要的输出如下所示:
[FLOWPLAYER=http://www.superaffiliatecoachingclub.com/sacconly/utl/modules/sitereviews/compucard/compucard_controller.swf,600,450]谢谢!
发布于 2010-04-23 23:15:45
preg_match('/SWFObject\( "(.*?)", ".*?", "(\d+)", "(\d+)"/', $str, $match);
$output = "[FLOWPLAYER={$match[1]},{$match[2]},{$match[3]}]";发布于 2010-04-23 23:13:28
/SWFObject\( "(.+?)"/\1将包含url,这似乎是您试图从主题中提取的唯一内容。
https://stackoverflow.com/questions/2699647
复制相似问题