Link to home
Start Free TrialLog in
Avatar of steva
steva

asked on

Monitoring who download files

I have an html page that describes a product. A link at the end "try for free" will allow the visitor to download a trial setup.exe.  But I want to know who's downloading these trial copies , so my though is to have clicking of "try for free" bring up an order form that the user fills in with address, phone, email, etc.  When that form is submitted, the data is stored in a database and  another page comes up that simply has a button labeled "Download" that's  linked to setup.exe.  

But what's to keep someone from viewing the html source of the download page and seeing exactly where the setup.exe file is located and then giving that address to friends, coworkers, etc., to download setup.exe directly, without me knowing where the files are going?

How do people generally control free downloads from web pages?

Thanks for any thoughts.

steva

Avatar of Ashish Patel
Ashish Patel
Flag of India image

What you can do here is when the link to download is clicked, dont have the URL of the setup.exe in the hyperlink. Instead call a file may be aspx which reads the setup.exe as binary stream and redirects it to the client using response.write with binary headers.
One more option to this can be a very simple stuff, where the download link can take you to another page and this page (aspx) which can redirect the setup.exe file to client user but before that you can check if the HTTP_Referer to this page is from the FORMS page or not. If not then dont do anything and redirect the user to FORMS page first and then once then submit the data you can redirect your setup.exe from that aspx page.
Avatar of steva
steva

ASKER

Ok. Great!  Let's try the second approach.

The only way I know of to download a file to someone from a web page is to specify the  .exe in a link, and then the viewer's local download software pulls it down when they right-click and select Save As.  How would I "redirect setup.exe to the client" and what would they have to do to initiate the download?

Thanks for your help.

steva
for example the link will point to an aspx file
and the aspx file which we have created will have just one thing
<%
Response.Redirect ("/path/setup.exe")
%>
By doing this your setup.exe path would be kept hidden

Avatar of steva

ASKER

Ok.  I assume my setup.exe can be 10 MBytes or so without causing  a problem?

And what happens at the user's machine when this stream starts coming down?  They still need to get their local  download software running somehow so they can specify where the file is to be stored.  
ASKER CERTIFIED SOLUTION
Avatar of Ashish Patel
Ashish Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of steva

ASKER

Got it!  Thanks for your help.

steva