Prev   Next

Back to the top of the FAQ

Q. VideoQuota and protecting By Referrer.
A.

You need to embed the WMP call inside IE, otherwise WMP does not correctly include the REFERER field (bug MS about this?). So instead of a raw link in your ASP file like this:

<a href=mms://yourserver.com/video300.wmv>video300.wmv</a>

Do this:

<OBJECT ID="MediaPlayer" WIDTH=320 HEIGHT=240 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/ controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<PARAM NAME="FileName" VALUE="mms://yourserver.com/video300.wmv">
<PARAM NAME="ShowControls" VALUE="1">
<PARAM NAME="ShowDisplay" VALUE="1">
<PARAM NAME="ShowStatusBar" VALUE="1">
<PARAM NAME="AutoSize" VALUE="1">
<Embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/windows/windowsmedia/download/"
filename="Station1.asx"
src="Station1.asx"
Name=MediaPlayer
ShowControls=1
ShowDisplay=1
ShowStatusBar=1
width=320
height=240>
</embed>
</OBJECT>

Or even better:

<%
On Error Resume Next
lngMP70 = IsObject(CreateObject("WMPlayer.OCX"))


' Windows Media Player 7 Code
If (lngMP70) Then
response.write "<OBJECT ID=MediaPlayer "
response.write " CLASSID=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6"
response.write 
" standby=""Loading Microsoft Windows Media Player components..."" "
response.write 
" TYPE=""application/x-oleobject"" width=""286"" height=""225"">"
response.write "<PARAM NAME=""url"" 
	VALUE=""mms://0.0.0.0/BBurns/Ballowe_Closingbell.asf"">"
response.write "<PARAM NAME=""AutoStart"" VALUE=""true"">"
response.write "<PARAM NAME=""ShowControls"" VALUE=""1"">"
response.write "<PARAM NAME=""uiMode"" VALUE=""mini"">"
response.write "</OBJECT>"

' Windows Media Player 6.4 Code
Else
response.write "<OBJECT ID=MediaPlayer "
response.write " CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
response.write "CODEBASE=http://activex.microsoft.com/
activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
response.write 
" standby=""Loading Microsoft Windows Media Player components..."" "
response.write 
" TYPE=""application/x-oleobject"" width=""286"" height=""225"">"
response.write "<PARAM NAME=""FileName"" 
VALUE=""mms://0.0.0.0/BBurns/Ballowe_Closingbell.asf"">"
response.write "<PARAM NAME=""AutoStart"" VALUE=""true"">"
response.write "<PARAM NAME=""ShowControls"" VALUE=""1"">"
response.write "</OBJECT>"
End If
response.End
%>

Back to the top of the FAQ

Prev   Next