Print Page | Close Window

downloading audio files

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=15416
Printed Date: 28 March 2026 at 11:07pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: downloading audio files
Posted By: iSec
Subject: downloading audio files
Date Posted: 10 June 2005 at 1:01am
Hello everyone, I'm looking for a code or a script that if someone clicks on a link to download a song they get a box that asks them to save/open that song... does anyone know how to do that?
P.S. I know they can right-click and save target as but the link i provide is masked by an image that is labled "download" this way I will prevent them from linking to my files from another site.


-------------
"When it gets dark enough, you can see the stars"
-Charles A. Beard



Replies:
Posted By: dpyers
Date Posted: 10 June 2005 at 6:58am
Originally posted by Info_Tech Info_Tech wrote:

Hello everyone, I'm looking for a code or a script that if someone clicks on a link to download a song they get a box that asks them to save/open that song... does anyone know how to do that?
The dialog box to save/open is controlled by the client pc's settings. If they already set the file type default to "save" or they default to "open", the dialog won't be presented. The user has control over how they handle a particular file type, not you.
 
Originally posted by Info_Tech Info_Tech wrote:

P.S. I know they can right-click and save target as but the link i provide is masked by an image that is labled "download" this way I will prevent them from linking to my files from another site.
 
I usually prevent hotlinking by either having the images/files in a data base or in a directory above the web root. The links themselves are to a script - e.g. downloads.asp?songnum=9999. The script checks http referrer and ip to make sure the request only comes from my site and from a particular page.
 
Google for hotlink asp for more techniques and sample code.
 
 
QUESTION: Just out of curiosity, why don't you want people linking to your images? They won't go to your site and see your adds, but it'll certainly be a boost to your page rank which in turn would drive traffic to your site.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: iSec
Date Posted: 11 June 2005 at 12:56pm
Originally posted by dpyers dpyers wrote:

The dialog box to save/open is controlled by the client pc's settings. If they already set the file type default to "save" or they default to "open", the dialog won't be presented. The user has control over how they handle a particular file type, not you.
 
Not always, regardless to your own settings... some websites will assume that yours settings are set so that you do not get to be asked to save/open and therefore they make their own settings to assure that you get to be asked to save/open... here's an example: http://music.download.com/mtcbeatz/3600-10686_32-100104879.html?tag=chart_topdls_artist - http://music.download.com/mtcbeatz/3600-10686_32-100104879.html?tag=chart_topdls_artist
 
Quote Just out of curiosity, why don't you want people linking to your images? They won't go to your site and see your adds, but it'll certainly be a boost to your page rank which in turn would drive traffic to your site.
It will eat all the bandwidth in my monthly hosting.. They would use my images as avatars..they would use my videos to post on forums or their own sites..they would also post my mp3 files somewhere...you know what i mean? but like you said...hotlinking is a good idea to prevent all that.

-------------
"When it gets dark enough, you can see the stars"
-Charles A. Beard



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net