<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[阿Tim日志]]></title> 
<link>https://atim.cn/index.php</link> 
<description><![CDATA[专业的php开发者.开发团队的带队人]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[阿Tim日志]]></copyright>
<item>
<link>https://atim.cn/post//</link>
<title><![CDATA[php操作mediaplayer播放asx列表 ]]></title> 
<author>bkkkd &lt;partybase@gmail.com&gt;</author>
<category><![CDATA[开发应用]]></category>
<pubDate>Sun, 05 Feb 2006 01:02:51 +0000</pubDate> 
<guid>https://atim.cn/post//</guid> 
<description>
<![CDATA[ 
	为了能准确的播放asx文件，我们必须用js对mediaplayer进行控制。 <br/><br/><br/>＜? <br/><br/><br/>//asx的格式：<br/>function channelprogramlist($filename)&#123;<br/> $str="";<br/> $str.="＜ASX version="3.0"＞rn";<br/> $str.="t＜ENTRY＞rn";<br/> $str.="tt＜AUTHOR＞".$filename; &nbsp; //节目名<br/> $str.="＜/AUTHOR＞rn";<br/> &nbsp; $filename=urlencode($filename); //把节目名转换<br/> &nbsp; $filepath="http://".192.168.0.1"/".$filename; &nbsp;//192.168.0.1是服务器的ip<br/> &nbsp; $str.= "tt＜REF HREF="$filepath" /＞rn"; <br/> &nbsp; $str.= "t＜/ENTRY＞rn"; <br/> &nbsp;&#125;<br/> $str.= "＜/ASX＞";<br/> return $str;<br/>&#125; <br/><br/><br/>//写asx文件<br/>function writeFile($str)&#123; &nbsp; &nbsp; &nbsp; &nbsp; <br/> &nbsp;$file="mms.asx";<br/> &nbsp;$fp = fopen($file,"w+");<br/> &nbsp;fwrite($fp,$str);<br/> &nbsp;fclose($fp);<br/> &nbsp;return &nbsp;$file;<br/>&#125; <br/><br/><br/>//控制mediaplayer每次从新读取文件<br/>function PlayChannel($urlstr)&#123;<br/> echo "＜script language="javascript"＞n";<br/> echo "function change()&#123;n";<br/> echo "t"."document.mediaPlayer.file=".$urlstr.";n";<br/> echo "&#125;n";<br/> echo "＜/script＞n";<br/>&#125; <br/><br/><br/>?＞ <br/><br/><br/>＜html＞<br/>＜head＞<br/>＜title＞播放器＜/title＞<br/>＜meta http-equiv="Content-Type" content="text/html; charset=gb2312"＞<br/>＜?php<br/>$filename="神话";<br/> PlayChannel(writeFile(channelprogramlist($filename))); <br/>?＞<br/>＜/head＞<br/>＜body leftmargin="0" topmargin="0" onLoad="change()" bgcolor="#000000"＞<br/>＜object id="mediaPlayer" width="554" height="380" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Microsoft Media Player components..." type="application/x-oleobject"＞<br/> ＜PARAM NAME="animationatStart" VALUE="true"＞<br/> ＜PARAM NAME="transparentatStart" VALUE="true"＞<br/> ＜PARAM NAME="autoStart" VALUE="true"＞<br/> ＜PARAM NAME="CanSeek" VALUE="FALSE"＞<br/> ＜PARAM NAME="showControls" VALUE="FALSE"＞<br/> ＜param name="FileName" value="mms.asx"＞<br/> ＜embed type="application/x-mplayerO" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" autostart="1" width="500" height="400"＞<br/> ＜/embed＞<br/>＜/object＞<br/>＜/body＞<br/>＜/html＞ <br/><br/>
]]>
</description>
</item><item>
<link>https://atim.cn/post//#blogcomment</link>
<title><![CDATA[[评论] php操作mediaplayer播放asx列表 ]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://atim.cn/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>