此页面代码是电影程序的播放页面代码,此页代码,经常相隔一段时间就会无法执行ASP,占用进程W3WP CPU %90以上,经在网上翻阅资料,这种情况是属于ASP死循环,全站点击播放页面是使用到ASP,按照我推测,是播放页面的代码出现问题,恳请各路ASP高手伸出缓帮之手.
注明:数据库是ACC的,
联系QQ:30575 酬谢
以下贴出的是源代码
<%MDBpath="xinyi/"%>
<!--#include file="xinyi/config.asp"-->
<!--#include file="xinyi/mdb_path_down.asp"-->
<%
Function bytes2BSTR(vIn)
dim i
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function
function GetSource(url)
//取得url页面的数据.
dim oXmlHttp,oStream
set oXmlHttp = Server.CreateObject("Microsoft.XMLHTTP"
oXmlHttp.open "GET",url,false
oXmlHttp.send()
GetSource = bytes2BSTR(oXmlHttp.responseBody)
end function
%>
<%
if request("id"

="" or request("no"

="" then
error="错误:读取地址时出错! <a href=JavaScript:window.close()>[关闭窗口]</a><br>"
else
set rs=server.CreateObject("ADODB.RecordSet"

rs.open "select cxn,cxv,hits,hy,gs from down where id="&request("id"

,conn,1,2
if not rs.eof then
Session("auth"

=true
cxn=""&rs("cxn"

&" "&rs("cxv"

&""
hy=rs("hy"

gs=rs("gs"

rs("hits")=rs("hits")+1
rs.update
end if
set rs=server.CreateObject("ADODB.RecordSet")
rs.open "select file from downfile where downid="&request("id")&" and downno="&request("no"),conn,1,1
MovieUrl=rs("file")
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<%
BoBoURL = GetSource( "http://123.4577.com/.h2b?HttpUrl2BoBo?" &MovieUrl )
%>
<html>
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide
function killErrors() {
return true;
}
window.onerror = killErrors;
// -->
</SCRIPT>
<script>
songid="<%=csk3000PlayFile%>"
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function setFull()
{
if(!document.playfull.CanStop())
{
alert("影片未开始播放无法切换为全屏模式")
}
else
{
alert("点击确定按钮后进入全屏播放模式,在全屏播放模式中按 Esc 键退出全屏模式")
document.playfull.SetFullScreen()
}
}
//-->
</script>
<SCRIPT>
//加入页面保护
function rf()
{return false; }
document.oncontextmenu = rf
function keydown()
{if(event.ctrlKey ==true || event.keyCode ==93 || event.shiftKey ==true){return false;} }
document.onkeydown =keydown
function drag()
{return false;}
document.ondragstart=drag
function stopmouse(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
return false;
else if
(navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
alert("天空影视-Www.4577.Com");
return false;
}
return true;
}
document.onmousedown=stopmouse;
if (document.layers)
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=stopmouse;
</SCRIPT>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=cxn%>[<%=request("no")%>] - 免费电影 -
www.4577.com</title>
<style type=text/css>
.font1 { color:red; }
body, td, p { font-size:12px; }
</style>
<body background="images/bg0.gif" leftMargin='0' topMargin='0' MARGINWIDTH='0' MARGINHEIGHT='0' oncontextmenu='self.event.returnValue=false;alert("请把本站网址
www.4577.com\n发给你的好友");' onkeydown='if(event.keyCode==78&&event.ctrlKey)return false;' onselectstart='event.returnValue=false' ondragstart='window.event.returnValue=false'>
<table width="550" border="0" align="center" cellpadding="3" cellspacing="0">
<tr bgcolor="#FFFFFF">
<td width=25% align="left">
<div align="center">本站采用P2P播放,不能播放的请<a href="../download/BoBo_ActiveX_V3.exe" target="_blank"><font color=red>下载安装P2P插件</font></a>
<a href=../play/playhelp.htm target=_blank>(点击这里查看详细的播放帮助)</a> 按ESC键退出全屏</div>
</td>
</tr>
</table>
<%
if error<>"" then
response.write error
else
if gs=3 then%>
<div align="center"></div>
<div align="center"><OBJECT classid="clsid

27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" WIDTH=465 height=300>
<PARAM NAME=movie VALUE="<%=csk3000PlayFile%>">
<PARAM NAME=quality VALUE=high>
<EMBED src="<%=csk3000PlayFile%>" loop=false menu=false quality=high WIDTH=465 height=300 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
<%
elseif gs=2 then
%>
</div>
<table width=468 height=374 border=0 align="center" cellpadding=0 cellspacing=1 bgcolor="#666666">
<!--DWLayoutTable-->
<tbody>
<tr align="center" valign="top">
<td height="347">
<table width="100%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td width="298" align="center" valign="top" bgcolor="#000000"> <div align="center">
<script language="javaScript">
var ERR_NonePlayer="播放器提示您:您的系统中没有安装Real Player播放器,请在主页上下载。\n\nMovie播放器将关闭。";
var ERR_FileNotFind="在线用户过多,服务器限制,请抢线或者换其他播放地址观看!";
var ERR_NotLocateServer="在线用户过多,服务器限制,请抢线或者换其他播放地址观看!";
var ERR_UnkownError="在线用户过多,服务器限制,请抢线或者换其他播放地址观看!";
</script>
<script language="VBScript">
on error resume next
RealPlayerG2 = (NOT IsNull(CreateObject("rmocx.RealPlayer G2 Control")))
RealPlayer5 = (NOT IsNull(CreateObject("RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)")))
RealPlayer4 = (NOT IsNull(CreateObject("RealVideo.RealVideo(tm) ActiveX Control (32-bit)")))
if not RealPlayerG2 and RealPlayer5 and RealPlayer4 then
if MsgBox("Real 中没有支持此内容的软件更新。", vbYesNo) = vbYes then
window.location = "http:/www.4577.com"
end if
end if
Sub player_OnBuffering(lFlags,lPercentage)
if (lPercentage=100) then
StartPlay=false
if (FirstPlay) then
FirstPlay=false
id=player
end if
exit sub
end if
End Sub
Sub player_OnErrorMessage(uSeverity, uRMACode, uUserCode, pUserString, pMoreInfoURL, pErrorString)
select case player.GetLastErrorRMACode()
case -2147221496
window.alert(ERR_FileNotFind)
case -2147221433,-2147221428,-2147221417,-2147217468
window.alert(ERR_NotLocateServer)
case else
window.alert(ERR_UnkownError)
end select
End Sub
</script>
<table width="100%" height="170" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<EMBED style="DISPLAY: inline" name=RealObj src=test.rpm width=575 height=365 MAINTAINASPECT="true" CONTROLS=ImageWindow CONSOLE="one">
<Object id="BoBo" width=100% height=22 classid='clsid:EC0978ED-24E3-403C-AB7A-060E388553E6' codebase='http://www.17bobo.com/Software/BoBo_ActiveX_V3.ocx'>
<PARAM NAME="MaxLinkCount" VALUE=100>
<PARAM NAME="MaxCacheTimeS" VALUE=300>
<PARAM NAME="MinCacheTimeS" VALUE=250>
<PARAM NAME="MaxCacheSizeMB" VALUE=100>
<PARAM NAME="MaxDownloadKbps" VALUE=0>
<PARAM NAME="MaxUploadKbps" VALUE=0>
<PARAM NAME="RealMediaType" VALUE=".mp4,.mp3">
<PARAM NAME="AllowDrag" VALUE=1>
<PARAM NAME="BoBoDragBar" VALUE=1>
<PARAM NAME="ShowSend" VALUE=1>
<PARAM NAME="ActName" VALUE="<%=BoBoURL%>">
</Object>
</td>
</tr>
</table>
</div></td>
</tr>
</table>
<table width="468" border=0 align="center" cellpadding=0 cellspacing=1 bgcolor="#000000">
<!--DWLayoutTable-->
<tbody>
<tr>
<td width="165"> <div align=center>
<center>
<table bordercolor=#808000 height=30 cellspacing=0 cellpadding=0 width=100%
border=1>
<tbody>
<tr>
<td width="100%" bordercolor=#00FF00 bgcolor=#009900> <div align="center">
<table cellspacing=0 cellpadding=0 width=100%
border=0>
<tbody>
<tr>
<td width="100%">
<div align="center"><a onClick=document.RealObj.SetFullScreen() href="Javascript:">点此全屏播放 按Esc返回</a></div></td>
</tr>
</tbody>
</table>
</div></td>
</tr>
</tbody>
</table>
</center>
</div></td>
<center>
<td width="300" align="center"><div align="center">
<table bordercolor=#808000 height=30 cellspacing=0 cellpadding=0 width=100%
border=1>
<tbody>
<tr>
<td width="100%" height=30 bordercolor=#FF0000 bgcolor=#666666>
<div align="center">
<input onClick="document.RealObj.DoPlay()" type=button value=播放 name=Submit style="BACKGROUND-COLOR: #3DB836; BORDER-BOTTOM: #a2a2a2 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-RIGHT: #a2a2a2 1px solid; BORDER-TOP: #ffffff 1px solid; COLOR: #333333; FONT-SIZE: 12px; HEIGHT: 22px; width: 35px">
<input onClick="document.RealObj.DoPause()" type=button value=暂停 name=Submit2 style="BACKGROUND-COLOR: #DDDDDD; BORDER-BOTTOM: #a2a2a2 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-RIGHT: #a2a2a2 1px solid; BORDER-TOP: #ffffff 1px solid; COLOR: #333333; FONT-SIZE: 12px; HEIGHT: 22px; width: 35px">
<input onClick="document.RealObj.DoStop()" type=button value=停止 name=Submit3 style="BACKGROUND-COLOR: #FFB64A; BORDER-BOTTOM: #a2a2a2 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-RIGHT: #a2a2a2 1px solid; BORDER-TOP: #ffffff 1px solid; COLOR: #333333; FONT-SIZE: 12px; HEIGHT: 22px; width: 35px">
</div>
</td>
</tr>
</tbody>
</table>
</div></td>
</center>
</tr>
</tbody>
</table> </td>
</tr>
</tbody>
</table> </td>
</tr>
</tbody>
</table>
<%
elseif gs=1 then%>
<center>
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="MediaPlayer1" width="468" height="380">
<param name="AudioStream" value="-1">
<param name="AutoSize" value="0">
<param name="AutoStart" value="-1">
<param name="AnimationAtStart" value="-1">
<param name="AllowScan" value="-1">
<param name="AllowChangeDisplaySize" value="-1">
<param name="AutoRewind" value="0">
<param name="Balance" value="0">
<param name="BaseURL" value>
<param name="BufferingTime" value="5">
<param name="CaptioningID" value>
<param name="ClickToPlay" value="-1">
<param name="CursorType" value="0">
<param name="CurrentPosition" value="-1">
<param name="CurrentMarker" value="0">
<param name="DefaultFrame" value>
<param name="DisplayBackColor" value="0">
<param name="DisplayForeColor" value="16777215">
<param name="DisplayMode" value="0">
<param name="DisplaySize" value="2">
<param name="Enabled" value="-1">
<param name="EnableContextMenu" value="-1">
<param name="EnablePositionControls" value="-1">
<param name="EnableFullScreenControls" value="0">
<param name="EnableTracker" value="-1">
<param name="Filename" value="<%=csk3000PlayFile%>">
<param name="InvokeURLs" value="-1">
<param name="Language" value="-1">
<param name="Mute" value="0">
<param name="PlayCount" value="1">
<param name="PreviewMode" value="0">
<param name="Rate" value="1">
<param name="SAMILang" value>
<param name="SAMIStyle" value>
<param name="SAMIFileName" value>
<param name="SelectionStart" value="-1">
<param name="SelectionEnd" value="-1">
<param name="SendOpenStateChangeEvents" value="-1">
<param name="SendWarningEvents" value="-1">
<param name="SendErrorEvents" value="-1">
<param name="SendKeyboardEvents" value="0">
<param name="SendMouseClickEvents" value="0">
<param name="SendMouseMoveEvents" value="0">
<param name="SendPlayStateChangeEvents" value="-1">
<param name="ShowCaptioning" value="0">
<param name="ShowControls" value="-1">
<param name="ShowAudioControls" value="-1">
<param name="ShowDisplay" value="0">
<param name="ShowGotoBar" value="0">
<param name="ShowPositionControls" value="-1">
<param name="ShowStatusBar" value="-1">
<param name="ShowTracker" value="-1">
<param name="TransparentAtStart" value="0">
<param name="VideoBorderWidth" value="0">
<param name="VideoBorderColor" value="0">
<param name="VideoBorder3D" value="0">
<param name="Volume" value="-40">
<param name="WindowlessVideo" value="0">
</object>
<Object id="BoBo" width=100% height=22 classid='clsid:EC0978ED-24E3-403C-AB7A-060E388553E6' codebase='http://www.17bobo.com/Software/BoBo_ActiveX_V3.ocx'>
<PARAM NAME="MaxLinkCount" VALUE=100>
<PARAM NAME="MaxCacheTimeS" VALUE=300>
<PARAM NAME="MinCacheTimeS" VALUE=250>
<PARAM NAME="MaxCacheSizeMB" VALUE=100>
<PARAM NAME="MaxDownloadKbps" VALUE=0>
<PARAM NAME="MaxUploadKbps" VALUE=0>
<PARAM NAME="RealMediaType" VALUE=".mp4,.mp3">
<PARAM NAME="AllowDrag" VALUE=1>
<PARAM NAME="BoBoDragBar" VALUE=1>
<PARAM NAME="ShowSend" VALUE=1>
<PARAM NAME="ActName" VALUE="<%=BoBoURL%>">
</Object>
<%else%>
错误:该文件为下载格式,不能在线观看!
<%end if%>
<%end if%>
<%end if%>
<table width="550" border="0" align="center" cellpadding="3" cellspacing="0">
<tr bgcolor="#FFFFFF">
<td width=25% align="left">
<div align="center"><font color=red>小贴士:</font>如果播放电影的时候经常缓冲,请点击“暂停”,等上几分钟后再点击“播放”.
我要留言</div>
</td>
</tr>
</table>
</html>