PHP-Download-Tracker | Single PHP Script That Helps You Track Downloads | Download Utils library
kandi X-RAY | PHP-Download-Tracker Summary
kandi X-RAY | PHP-Download-Tracker Summary
PHP Download Tracker is a single PHP script that helps you track downloads from your site. You configure the script with an offline (or protected) folder that contains files available for download. You can also configure a few display settings, including the ability to include a simple CAPTCHA. The script will present the user with a list of available files. When the user selects a file, the request is logged and then the download window pups up in the user's browser for them to save the file.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of PHP-Download-Tracker
PHP-Download-Tracker Key Features
PHP-Download-Tracker Examples and Code Snippets
Community Discussions
Trending Discussions on PHP-Download-Tracker
QUESTION
I have a directory of files which are downloaded by users package managers using the direct link to the file. I'm trying to set up file logging, so I can get statistics on the downloads. I’m using this script I found on GitHub: https://github.com/iNamik/PHP-Download-Tracker
I'm using the above script that consists of a files directory, a log directory, and an index.php which lists the files to download.
Index.php lists all files in the download directory. This file can be renamed to anything, i.e. download.php
If I use the index.php and click on the file I want to download, it logs the information and downloads it.
If I use the direct link to the file (/downloadfolder/file.exe) the index.php is bypassed and nothing is logged.
Is it possible to use something like mod_rewrite in Apache, to add download.php?file= before the file name in the direct link?
Example:
Access this Direct link: https://exampledomain.com/files/file.pdf --> this does not get logged. File transfer starts.
Have it be automatically rewritten to: https://exampldomain.com/files/download.php?file=file.pdf --> This does get logged. And the file transfer starts
ANSWER
Answered 2021-Nov-14 at 03:04This will redirect anything that doesn't exist to index.php
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install PHP-Download-Tracker
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page