everything works great. this is what I did:
html code
Code:
<object id="MediaPlayer1" width=200 height=400
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab$
standby="Loading Microsoft® Windows® Media Player components..."
type="application/x-oleobject" align="middle">
<param name="FileName" value="testlist.m3u">
<param name="AutoStart" value="1">
<param name="ShowStatusBar" value="True">
<param name="DefaultFrame" value="mainFrame">
<embed type="application/x-mplayer2"
pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"
src="testlist.m3u" align="middle"
width="200"
height="400"
defaultframe="rightFrame"
showstatusbar=true>
</embed>
</object>
testlist.m3u file:
Code:
test.php?name=test.mp3
test.php?name=violin.mp3
test.php script:
PHP Code:
<?
if($_SESSION['memberstatus']=="member"){
$servethis=$_GET['name'];
$filename = "/home/me/$servethis";
header("Content-Length: " . filesize($filename));
header('Content-Type: audio/mp3');
header('Content-Disposition: inline; filename=$servethis');
readfile($filename);
}
?>
Works great, but of course there's probably always a work around which allows leeching of files even with this method. However, this should preclude 99.9% of leechers from gaining access to the files (correct?).
This method works great with the flash mp3 player as well and the mp3 files are not cached in the browser's memory.
I could probably use some other method of serving the files (ie htaccess and so forth) but this will have to do for now. I reserved this method as a last resort because I will have to host the main site and the mp3 files on the same server (my 2nd web hoster). I originally wanted to host the main site on hoster #1 and serve the files from host #2. This was my original intention since host 2 provided unlimited space and BW
hehe.
Furthermore, I am able to install software and have more features such as telnet/shell access with host 1, but now I will have to host my main site plus the mp3 files on host 2, unless I come up with an alternative method of serving files in this fashion remotely (and I think I may have it).
"
technology is only as good as the capitalistic ideals upon which it is based
"
Bookmarks