简单隐藏加密视频地址,以防止用户下载,采用js 调用播放器:
引用js文件:
type="text/javascript">
// JScript 文件
function selplay(ypurl)
{
document.write("
classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 height=69
id=MediaPlayer width=356>")
document.write("
value='-1'> ")
document.write("
ypurl+"> ")
document.write("
codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701
flename=mp src='' width=356 height=320>")
document.write("
")document.write("
")}
对路径进行编码加密:
protected string ypJm(string ypurl)
{
if (ypurl.Trim().Length > 0)
{
return Server.UrlEncode(ypurl);
}
else
{
return "";
}
}
调用:
selplay(("<%=ypJm(artless.plus.Replace(";","").Replace("book/",""))
%>"));