ckplayer加载入广告方法

 更新时间:2014年3月18日 19:05  
ckplayer.js加入广告代码地址

ckplayer.js加入广告地址

function $Showhtml(){
	var player;
	
	player='<embed name="Player" id="Player" src="/ckplayer/ckplayer.swf" flashvars="a='+encodeURIComponent(url)+'&my_url='+encodeURIComponent(window.location.href)+'&e=1&l=/ckplayer/adv.php?id={$pat}" quality="high" width="100%" height="'+height+'" align="middle" allowScriptAccess="always" allowFullscreen="true" type="application/x-shockwave-flash"></embed>';

	return(player);
}
playerhtml=$Showhtml();

adv.php?id={$pat}


adv.php加入广告内容

{l->图片地址}{r->广告链接地址}{t->广告时长}

可以加入多个

随机的话加个rand

$id=rand(1,4);
if($id==1)
        echo('{l->http://img.flash34.com/pics/2014/03/d7287a72f97c0e03b8c08f41e19aa5e3.jpg}{r->http://www.zhuxianfei.com/?11}{t->5}');
elseif($id==2)
        echo('{l->http://img.flash34.com/pics/2014/03/ec3e8dc3004d41d2b975fb0552e02b92.jpg}{r->http://www.zhuxianfei.com/?22}{t->6}');
elseif($id==3)
        echo('{l->http://img.flash34.com/pics/2014/03/4371eaadebbbcf977a65e022ab518269.jpg}{r->http://www.zhuxianfei.com/?33}{t->7}');
else
        echo('{l->http://img.flash34.com/pics/2013/12/07fc94cf5e7bd521e0dcc2e0816a6639.jpg}{r->http://www.zhuxianfei.comt/?4}{t->8}');