Mobile app version of vmapp.org
Login or Join
Murray432

: How to inform website owner if someone downloads something from the website? Right, beginner here so bare with me.. What i've got: A simple html/css website with a page where clients can find

@Murray432

Posted in: #Download #LookingForAScript #Php #ServerSideScripting #WebDevelopment

Right, beginner here so bare with me..



What i've got: A simple html/css website with a page where clients can find informative documents in the form of PDF's and rich text documents, they can just click the link to download the documents as desired.

What the website owner wants: When the client/user selects a document to download, a form appears asking them to input their personal or company name and submit before allowing them to download as normal. This information, who downloaded what and when, should be emailed to the website owner or possibly logged in a hidden site page.



I've never done any server-side scripting but i'm happy to learn. (I'm no professional, just throwing this together for a family friend according to their specifications).
The reason i gave up googling temporarily and came here is that with all the different possible approaches and presumably a lot of outdated information i'm a bit lost on such a big topic.

So i'm looking for a recommendation for a scripting language and a point in the right direction in terms of methods of tutorials i could put to work to implement the above. Or perhaps even a simple opensource script that i could learn from and adapt to suit the website owners needs.

Any advice appreciated! Sorry if this isn't the right place/question to ask.

Scripting languages his host accepts: perl, php, python.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Murray432

3 Comments

Sorted by latest first Latest Oldest Best

 

@Jamie184

The easiest way would be to link the file name to a form (or a dropdown in the form). Once you know the filename you can ask the user what you want. And when the user submits the form. Your PHP (or perl, phtyon) script will save the info and email to whomever you want then serve the file.

This way you don't even need to expose the files to public until you want to serve it.

10% popularity Vote Up Vote Down


 

@Bryan171

One simple way to provide a file if the user supplies their email address would be to use MailChimp, or a similar email newsletter service with an autoresponder feature.

Using MailChimp, you could:


Set up an email signup form to capture email addresses and other data.
Set up an autoresponder that sends them a link to the download by email.


As soon as the person signs up and confirms their email address, the autoresponder would send them an email containing whatever text you want, which might simply be a link to the download hosted somewhere on your server.

If you want to track who downloaded the file, you could enable MailChimp's tracking links in your emails.

The advantages of using this set up over a scripted alternative with PHP are:


You force the user to confirm their email address (by clicking a link in their email) before allowing them to download the product, which prevents them from using a fake address.
You're building a mailing list of people to market to in the future.


The disadvantages of doing it this way are:


You have to make the download publicly accessible. You can use a robots.txt file to prevent Google picking up the PDF/downloadable item when crawling and adding it to its search results, but the file will still be accessible publicly for anyone who guesses the URL (so make it hard to guess), and the link will be shareable.
It doesn't scale so well for sites with multiple free downloads.


If you've read this and don't think MailChimp is what you're looking for, I would recommend that you use the e-junkie electronic download service. They have a feature called Free Checkout that allows you to offer downloadable goods for free in return for supplying a name and email address. The links they provide to your product expire after a fixed time or certain number of download attempts, so they can't be spread around and reused.

10% popularity Vote Up Vote Down


 

@Nimeshi995

A pretty tutorial for doing it via PHP can be found here: tutorialzine.com/2010/02/php-mysql-download-counter/
Or maybe even here: www.google.com/search?hl=all&q=php+download+counter ;-)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme