473,401 Members | 2,139 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,401 software developers and data experts.

Looking for script to do a "controlled download"

Hi,
I have a PDF file on my site that I want to distribute freely but I want to
be able to contact anyone who downloaded it to warn them about mistakes and
modification and new versions and updates...

So I need some way to keep their email addresses and someway to prevent them
sharing the link to the PDF file.

I've seen some sites
- with a form for the user to fill in
- where the client fills in his email address
- and receives a mail
- containing a unique link to the file to download
- and I think the link has a timeout on it somehow.

Can anyone point me to a script so that I can set up something similar?

TIA

Joey


Apr 12 '07 #1
1 2056
Joey,

For controlling the download you need to:
1. make sure the file can only be downloaded through a script
2. add some code to the script to control the dowlnoad.

For the first you need to put the file somewhere where your php script
can read it but the visitors of your website can not. Then how to write
the script you can find in the user comments on:
http://nl2.php.net/manual/en/function.header.php

The last is just a matter of putting a form on you website that visitors
have to fill out. You let the form call the download script. Make the
download script check if the form has been filled out properly. If it
has, you store the info in a database or have it sent to your own email
address, then continue with the download. If not, you print some error
message and let them try again.

"The last" is really very basic php, i assume you can do it, if not,
just look around for some beginners tutorials, there must be thousends
of them out there. The first is a bit tricky, i suggest you first
experiment with the code for reading and printing a file until you can
successfully get a html file displayed through the script, then
experiment with the header stuff until you get it working with pdf as well.

I agree this is more work then a ready made script, but in the end you
will be really in control.

Greetings,

Henk Verhoeven,
www.phpPeanuts.org.

Joey Nolan schreef:
Hi,
I have a PDF file on my site that I want to distribute freely but I want to
be able to contact anyone who downloaded it to warn them about mistakes and
modification and new versions and updates...

So I need some way to keep their email addresses and someway to prevent them
sharing the link to the PDF file.

I've seen some sites
- with a form for the user to fill in
- where the client fills in his email address
- and receives a mail
- containing a unique link to the file to download
- and I think the link has a timeout on it somehow.

Can anyone point me to a script so that I can set up something similar?

TIA

Joey

Apr 15 '07 #2

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

Similar topics

6
by: Fran Shescher | last post by:
If you have damaged any of your Visual Basic Professional 3.0 disks, replacements can be found here: http://www.geocities.com/peanutbutter88888 This is ONLY for LEGAL users of VB Pro 3 ......
2
by: Gary D. Rezek | last post by:
Hi All, First of all I'm mostly an MS Access guy (and novice learning MSSQL guy) and put on this project because of personnel changes, etc and because of db experience. I've only been doing this...
1
by: Luis Ferrao | last post by:
Hi, My Windows Forms application uses the WebBrowser control to open an Excel file since OLE objects are gone in .Net. The application is actualy a clone of the one found in the MS Knowledge...
1
by: cajunmaori | last post by:
I am having trouble downloading an excel report generated from our AS pages. We presumed it was something to do with the SSL certificate w just installed, so loaded the ForceSSL.inc script from...
24
by: AES/newspost | last post by:
On many web sites or pages (including my own home page) clicking on certain links will start downloading a PDF file, sometimes without the author having provided any warning in the text of the page...
3
by: MeNotHome | last post by:
I am trying to automate web browser navigation and form fill out in vb.net Why doesn't this work? AxWebBrowser1.Document.Forms(0).All("action-download").click() I also tried...
4
by: L. Scott M. | last post by:
I am invoking a file download using the following code: Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + downloadFile.Name);...
2
by: nedu | last post by:
Hi, Since I need to insert a a excel file in the HTML, I used <iframe> tag. But this tag PROMPT me the "File Download" dialog box every time the page got refreshed. Is there any ASP code to block...
1
by: all chek all | last post by:
hello dear how are you ? i want script news for download plaese answer me. salim akrami 'iran'
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
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...
0
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...

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.