473,394 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

file download

Hi,

I want the MP3 audio files to be able to download by users only. Even I set
the pages validated by session, anyone still can type the download url to
get my files without access of the pages where download URL provided. How
can I do in order to prevent everyone from downloading without a user
account?
Thanks for any idea?

Atse
Jul 19 '05 #1
7 5650
http://www.aspfaq.com/2276
Same logic

Ray at work

"atse" <du******@yahoo.com> wrote in message
news:wP******************@news02.bloor.is.net.cabl e.rogers.com...
Hi,

I want the MP3 audio files to be able to download by users only. Even I set the pages validated by session, anyone still can type the download url to
get my files without access of the pages where download URL provided. How
can I do in order to prevent everyone from downloading without a user
account?
Thanks for any idea?

Atse

Jul 19 '05 #2
atse wrote on 04 nov 2003 in microsoft.public.inetserver.asp.general:
I want the MP3 audio files to be able to download by users only. Even
I set the pages validated by session, anyone still can type the
download url to get my files without access of the pages where
download URL provided. How can I do in order to prevent everyone from
downloading without a user account?
Thanks for any idea?


1 Use an asp file

if session("hasUserAccount")=false then response.redirect"/404.asp"

2 Then binary send the mp3

Response.AddHeader "Content-Disposition", "attachment; filename=
strFileName
Response.AddHeader "Content-Length", strFileSize
Response.ContentType = "audio/mpeg3"
Response.BinaryWrite objStream.Read
something like that, anyway.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #3
This is the good way to download.
Since this is mp3 file, how can I make it play without prompting download
once the clients set MS media player available?
Thanks

Atse

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
atse wrote on 04 nov 2003 in microsoft.public.inetserver.asp.general:
I want the MP3 audio files to be able to download by users only. Even
I set the pages validated by session, anyone still can type the
download url to get my files without access of the pages where
download URL provided. How can I do in order to prevent everyone from
downloading without a user account?
Thanks for any idea?


1 Use an asp file

if session("hasUserAccount")=false then response.redirect"/404.asp"

2 Then binary send the mp3

Response.AddHeader "Content-Disposition", "attachment; filename=
strFileName
Response.AddHeader "Content-Length", strFileSize
Response.ContentType = "audio/mpeg3"
Response.BinaryWrite objStream.Read
something like that, anyway.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jul 19 '05 #4
In news:ol*******************@twister01.bloor.is.net. cable.rogers.com,
atse <du******@yahoo.com> typed:
: This is the good way to download.

: Since this is mp3 file, how can I make it play without prompting
: download once the clients set MS media player available?

You can't, it's *not your computer*, it's the client. If you stream your MP3
through your server software, then the browser's helper application will
play (load) the file being streamed.

However, the method you are using is not streaming the MP3 file exactly,
it's streaming the download file. The user will have to choose open, and/or
rather than download.
Do you want the client to have the MP3 file saved (not in their Internet
Temporary Files) on their machine after playing or do you just want to let
the user *listen/play* the MP3 file?

: Thanks
:
: Atse

Jul 19 '05 #5

"Don Verhagen" <ne**@southeast-florida.com> wrote in message
news:bo*************@ID-181477.news.uni-berlin.de...
In news:ol*******************@twister01.bloor.is.net. cable.rogers.com,
atse <du******@yahoo.com> typed:
: This is the good way to download.

: Since this is mp3 file, how can I make it play without prompting
: download once the clients set MS media player available?

You can't, it's *not your computer*, it's the client. If you stream your MP3 through your server software, then the browser's helper application will
play (load) the file being streamed.

However, the method you are using is not streaming the MP3 file exactly,
it's streaming the download file. The user will have to choose open, and/or rather than download.
Do you want the client to have the MP3 file saved (not in their Internet
Temporary Files) on their machine after playing or do you just want to let
the user *listen/play* the MP3 file?
I want the client to play the MP3 online instead of Save As...but I don't
want to use a anchor tab <a href="my.mp3"> in order to prevent from typing
the URL by anonymous to play the audio. Of course, it is hard to avoid from
saving the MP3 in "Internet Temporary Files" after playing.
Any idea?
Thanks

: Thanks
:
: Atse

Jul 19 '05 #6
It's all a client option. Even without a href, I can always change my .mp3
settings to have IE prompt me to download the file. You cannot control
this.

Ray at work

"atse" <du******@yahoo.com> wrote in message
news:Wa********************@news04.bloor.is.net.ca ble.rogers.com...

"Don Verhagen" <ne**@southeast-florida.com> wrote in message
news:bo*************@ID-181477.news.uni-berlin.de...
In news:ol*******************@twister01.bloor.is.net. cable.rogers.com,
atse <du******@yahoo.com> typed:
: This is the good way to download.

: Since this is mp3 file, how can I make it play without prompting
: download once the clients set MS media player available?

You can't, it's *not your computer*, it's the client. If you stream your MP3
through your server software, then the browser's helper application will
play (load) the file being streamed.

However, the method you are using is not streaming the MP3 file exactly,
it's streaming the download file. The user will have to choose open,

and/or
rather than download.
Do you want the client to have the MP3 file saved (not in their Internet
Temporary Files) on their machine after playing or do you just want to let the user *listen/play* the MP3 file?


I want the client to play the MP3 online instead of Save As...but I don't
want to use a anchor tab <a href="my.mp3"> in order to prevent from typing
the URL by anonymous to play the audio. Of course, it is hard to avoid

from saving the MP3 in "Internet Temporary Files" after playing.
Any idea?
Thanks

: Thanks
:
: Atse


Jul 19 '05 #7
In news:Wa********************@news04.bloor.is.net.ca ble.rogers.com,
atse <du******@yahoo.com> typed:
: "Don Verhagen" <ne**@southeast-florida.com> wrote in message
: news:bo*************@ID-181477.news.uni-berlin.de...
:: In
:: news:ol*******************@twister01.bloor.is.net. cable.rogers.com,
:: atse <du******@yahoo.com> typed:
::: This is the good way to download.
::
::: Since this is mp3 file, how can I make it play without prompting
::: download once the clients set MS media player available?
::
:: You can't, it's *not your computer*, it's the client. If you stream
:: your MP3 through your server software, then the browser's helper
:: application will play (load) the file being streamed.
::
:: However, the method you are using is not streaming the MP3 file
:: exactly, it's streaming the download file. The user will have to
:: choose open, and/or rather than download.
::
::
:: Do you want the client to have the MP3 file saved (not in their
:: Internet Temporary Files) on their machine after playing or do you
:: just want to let the user *listen/play* the MP3 file?
:
: I want the client to play the MP3 online instead of Save As...but I
: don't want to use a anchor tab <a href="my.mp3"> in order to prevent
: from typing the URL by anonymous to play the audio. Of course, it is
: hard to avoid from saving the MP3 in "Internet Temporary Files" after
: playing.
: Any idea?

You need to get streaming component on your server, such as from Microsoft.

And example link would be: mms://mydirectory/myfile.mp3
Notices that's it's not the usual "http://" link.

mms:// - microsoft streaming protocol
rtsp:// - Quicktime streaming protocol

or you can use http:// protocol to stream also, look at this link:
http://www.developingwebs.net/html/mp3.php

Don


: Thanks
:
::
::: Thanks
:::
::: Atse
Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Brandon Walters | last post by:
I wrote a file download module for my website. The reason for the file download module is that my website downloads work on a credit based system. So I need to keep track of and limit daily...
0
by: Buddy Ackerman | last post by:
I am trying to implment a file download via a link such that when clicked, instead of starting the default application for that type of file the user will be presented with a download dialog...
1
by: Roy | last post by:
Hi, I have a problem that I have been working with for a while. I need to be able from server side (asp.net) to detect that the file i'm streaming down to the client is saved...
0
by: Rhys666 | last post by:
Basically I have a link that opens my download page and the querystring identifies the type of 'template' Excel spreadsheet has asked to download. The download page reads the querystring,...
4
by: Nathan Sokalski | last post by:
I want to give visitors to my site the option of downloading a generated ..txt file by clicking a button. I know how to generate text files, but how do I cause the browser to pop up one of those...
3
by: tshad | last post by:
I have a function that downloads a file to the users computer and it works fine. The problem is that I then want the program to rename the file (file.move) to the same name plus todays date. ...
16
by: matt | last post by:
I have used some free code for listing files for download, but I want to send an email to the administrator when the file has been downloaded. I have got some code in here that does it, but it will...
35
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
4
by: Roberto Mora | last post by:
I have not done programming in a very long time and what is worst, I never learned VB. Although my job does not require this knowledge, I cam across a problem that although it seemed simple it has...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.