Got bandwidth?

Can you stop hotlinking of MP3s in embed/bgsound? I can’t see a way, offhand.


Comment by Roger Benningfield #
2005-04-09 23:49:26

An easy way? No. But how ’bout storing the MP3 outside the webroot, and accessing it via your scripting language of choice? From there, leverage whatever session management you’ve got available to restrict access to local users.

In CF, it’d look something like:

<cfif session.allowDownload>
<cfcontent type=”audio/mpeg” file=”c:somedirfoo.mp3” /><cfabort>

<cfset session.allowDownload = true />
<a href=”mymp3.cfm”>download</a>

Now, the hotlinker in question could still get around it if he’s determined, but it would stop casual abuse.

Comment by Phil Ringnalda #
2005-04-10 00:07:45