473,804 Members | 2,101 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5697
http://www.aspfaq.com/2276
Same logic

Ray at work

"atse" <du******@yahoo .com> wrote in message
news:wP******** **********@news 02.bloor.is.net .cable.rogers.c om...
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.publi c.inetserver.as p.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("hasUse rAccount")=fals e then response.redire ct"/404.asp"

2 Then binary send the mp3

Response.AddHea der "Content-Disposition", "attachment ; filename=
strFileName
Response.AddHea der "Content-Length", strFileSize
Response.Conten tType = "audio/mpeg3"
Response.Binary Write 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******** ************@19 4.109.133.29...
atse wrote on 04 nov 2003 in microsoft.publi c.inetserver.as p.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("hasUse rAccount")=fals e then response.redire ct"/404.asp"

2 Then binary send the mp3

Response.AddHea der "Content-Disposition", "attachment ; filename=
strFileName
Response.AddHea der "Content-Length", strFileSize
Response.Conten tType = "audio/mpeg3"
Response.Binary Write 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******** ***********@twi ster01.bloor.is .net.cable.roge rs.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**@southea st-florida.com> wrote in message
news:bo******** *****@ID-181477.news.uni-berlin.de...
In news:ol******** ***********@twi ster01.bloor.is .net.cable.roge rs.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******** ************@ne ws04.bloor.is.n et.cable.rogers .com...

"Don Verhagen" <ne**@southea st-florida.com> wrote in message
news:bo******** *****@ID-181477.news.uni-berlin.de...
In news:ol******** ***********@twi ster01.bloor.is .net.cable.roge rs.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******** ************@ne ws04.bloor.is.n et.cable.rogers .com,
atse <du******@yahoo .com> typed:
: "Don Verhagen" <ne**@southea st-florida.com> wrote in message
: news:bo******** *****@ID-181477.news.uni-berlin.de...
:: In
:: news:ol******** ***********@twi ster01.bloor.is .net.cable.roge rs.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
6130
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 downloads. It uses fpassthru() and some headers() to send a file to the requesting user. The get.php file that I wrote (the file download module if you will) works like a charm for .ZIP files and .TXT files. However, when .EXE files are downloaded...
0
1836
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 window. Well, thanks to Steve Orr, I have that working. However, I still have a few issues. First, the download dialog does not have the name of the file being downloaded in the "File name" field, instead it has the name of the aspx page that have...
1
5405
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 completely/succsessfully on the client's computer before updating some metadata on the server (file downloaded date for instance) However, All examples i have tried, and all examples I have found that other people says works - doesn't work for me :-(
0
1750
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, identifies the template required then uses Response.AppendHeader to amend the response to create the file download dialogue. On my local machine this works fine and the download dialogue correctly identifies the file name and type attempting to be...
4
2336
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 dialog boxes that says something like "Do you want to download FILEX.txt?" I want the user to be able to download the file rather than have the file displayed in the browser, because the file will include some characters such as tabs and commas....
3
2143
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. The problem is that when you run the program it gets to the: Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name)
16
3263
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 not print in the username or email amddress of the person doing the download - which I am collecting from a form on the previous page. I can get the name and email address to print out normally, just not into the email sending body. I have...
35
9368
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 500000 to 3200000 of a file whose size is say 20MB... how do i request a download which starts directly at 500000th byte... thank u cheers
4
2427
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 become a nightmare. There is a log that gets generated in a regular basis and need to put most , but not all its contents in a DB (new or existent, it doesn't matter). because the fields that I need to cover are vertically and there is junk in...
1
47495
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 on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
0
9714
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10600
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10350
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10096
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9174
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7638
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6866
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3834
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.