[thelist] Counting downloads via hyperlink

Tom Dell'Aringa pixelmech at gmail.com
Mon Jul 24 12:13:57 CDT 2006


On 7/24/06, Chris Dempsey <evolt at cubeit.co.uk> wrote:
>
> If you can code with PHP you could point the Download PDF link to a page
> page which will record the click before showing the link to the file.  You
> can record the click either in a database or a text file using the file
> system [not sure what the PHP equivalent is but in Classic ASP it's called
> the FileSystem Object].
>
> eg.
>
> - User browses page with PDF links
> - User Clicks Link to get PDF they want
> - Link points to counter page and passes unique file ID
> - counter page updates download count for requested file then displays the
> real link to the file
>
> Not very gracefully put but think you'll get the idea.


Thanks for all the ideas so far. I don't want to have to mess with the log.
I should have mentioned the PDF links are all on one page and I really don't
want to have an interstitial page or have them have to browse pages to get
to the pdf, so it has to work within the one page. If there was a way to
trigger some php on an href click, I could add them up in a mySQL table or
txt file somewhere perhaps?

Tom



More information about the thelist mailing list