![]() |
Suggestions needed for pdf tracking mod
I have a directory full of pdfs that are now indexed and searchable by PhpDig.
I am looking to add a feature whereby when the user clicks on a search result (and consequently downloads a pdf file) a record is kept that that specific file was downloaded. Then I'll make a separate app (or add it to the PhpDig admin page) that can display stats for all the pdfs (how many times each one was downloaded) I'm new to PhpDig so I though that I would ask if anyone had a suggestion as to best go about this. One idea i had : I can manually edit the database: change the spider.path field for a all the pdf's from "pdf/" to "download.php?file=" download.php would handle the hand-off, writing a row to the DB and sending the user the file. Is this the way to go about his or is there a better way? |
Suggestions needed for pdf tracking mod
I have a directory full of pdfs that are now indexed and searchable by PhpDig.
I am looking to add a feature whereby when the user clicks on a search result (and consequently downloads a pdf file) a record is kept that that specific file was downloaded. Then I'll make a separate app (or add it to the PhpDig admin page) that can display stats for all the pdfs (how many times each one was downloaded) I'm new to PhpDig so I though that I would ask if anyone had a suggestion as to best go about this. One idea i had : I can manually edit the database: change the spider.path field for a all the pdf's from "pdf/" to "download.php?file=" download.php would handle the hand-off, writing a row to the DB and sending the user the file. Is this the way to go about his or is there a better way? |
Why not just go to the admin panel, click the "Statistics" link and then click the "Last search clicks" link?
|
Hi, Charter
Well I need to keep a total of how many times each pdf was downloaded. Later I will also need to tag the downloads to specific users and throttle how many they can download. |
PhpDig doesn't keep track of specific users, but you can get totals by running the following query:
Code:
SELECT count(*),c_url FROM clicks GROUP BY c_url; |
Use your server stats this is not a front side application issue. Awstats will tell you exactly how many downloaded the file. It should be on your server anyway.
|
All times are GMT -8. The time now is 12:34 PM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.