raulgonzalez
02-15-2007, 01:15 PM
Hello,
I am using the code below which displays a sample movie. I wanted to know how to restrict the user to only viewing the video and not downloading it.
if users types in http://mysite.ext/video/file.php then they will be able to download it.
I tried the "$_SERVER['HTTP_REFERER']" but that didn't work since it seems to respond only to a paged refered via a clicked link and not to a redirection
I don't know, maybe something that works with a GET method or something. I will be googling.
Thank you
------------------------------------------------------------------------------------------------------
<!-- begin embedded WindowsMedia file... -->
<?
$url = "../video/file.php";
?>
<table border='0' cellpadding='0' align="left">
<tr><td>
<OBJECT id='mediaPlayer' width="320" height="285"
classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'
codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
<param name='fileName' value="<? echo $url; ?>">
<param name='animationatStart' value='true'>
<param name='transparentatStart' value='true'>
<param name='autoStart' value="true">
<param name='showControls' value="true">
<param name='loop' value="true">
<EMBED type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1'
bgcolor='darkblue' showcontrols="true" showtracker='-1'
showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="320" height="285"
src="<? echo $url; ?>" autostart="true" designtimesp='5311' loop="true">
</EMBED>
</OBJECT>
</td></tr>
<!-- ...end embedded WindowsMedia file -->
<!-- begin link to launch external media player... -->
<tr><td align='center'>
<a href="<? echo $url; ?>" style='font-size: 85%;' target='_blank'>Launch in external player</a>
<!-- ...end link to launch external media player... -->
</td></tr>
</table>
------------------------------------------------------------------------------------------------
I am using the code below which displays a sample movie. I wanted to know how to restrict the user to only viewing the video and not downloading it.
if users types in http://mysite.ext/video/file.php then they will be able to download it.
I tried the "$_SERVER['HTTP_REFERER']" but that didn't work since it seems to respond only to a paged refered via a clicked link and not to a redirection
I don't know, maybe something that works with a GET method or something. I will be googling.
Thank you
------------------------------------------------------------------------------------------------------
<!-- begin embedded WindowsMedia file... -->
<?
$url = "../video/file.php";
?>
<table border='0' cellpadding='0' align="left">
<tr><td>
<OBJECT id='mediaPlayer' width="320" height="285"
classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'
codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
<param name='fileName' value="<? echo $url; ?>">
<param name='animationatStart' value='true'>
<param name='transparentatStart' value='true'>
<param name='autoStart' value="true">
<param name='showControls' value="true">
<param name='loop' value="true">
<EMBED type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1'
bgcolor='darkblue' showcontrols="true" showtracker='-1'
showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="320" height="285"
src="<? echo $url; ?>" autostart="true" designtimesp='5311' loop="true">
</EMBED>
</OBJECT>
</td></tr>
<!-- ...end embedded WindowsMedia file -->
<!-- begin link to launch external media player... -->
<tr><td align='center'>
<a href="<? echo $url; ?>" style='font-size: 85%;' target='_blank'>Launch in external player</a>
<!-- ...end link to launch external media player... -->
</td></tr>
</table>
------------------------------------------------------------------------------------------------
