I have a zip file on a website running on a Windows 2008 / IIS7 server. Is there a way to check how many times this file has been downloaded?
You can do it differently
(in order of increasing complexity and stupidity);)
Provide a direct link to the file and track your weblogs. You can use Microsoft's LogParser tool to run SQL, such as log queries, to retrieve the necessary data.
Do not provide a direct link to the file. Instead, click the button. When the button is pressed, you increase the counter and serve the file.
URL (, bit.ly) - ..
. "+" URL- bit.ly, . .
- . :
shortcode1 - Path1\File1.extshortcode2 - Path2\File2.ext...shortcodeN - PathN\FileN.ext
zip :
http://www.yoursite.com/getFile.aspx?code=shortcode1
getFile.aspx , , , Path1\File1.ext .
, , /. http://www.iis.net/community/default.aspx?tabid=34&g=6&i=1494
/ ISAPI
.zip ASP.Net IIS .
, . awstats webalizer.
.
, .
, , .
Or you directly track it using Google Analytics
<a href="http://www.example.com/files/map.pdf" onClick="javascript: _gaq.push(['_trackPageview', '/downloads/map']);">
more about this here .
Source: https://habr.com/ru/post/1760202/More articles:Video disables the phone - androidHow to send XML via JavaScript to REST API? - javascriptGoogle search results via XML not iframe - google-search-apiSystem.DirectoryServices.AccountManagement.PrincipalContext and impersonation in WCF service - c #Dragging and dropping images in a web browser in WPF - c #Как получить элемент из объекта JavaScript? - jsonIs there any way to find out which line the exception was thrown at? - c #Printing a tree structure in a JSP page - javaA variable of class A in class B and a pointer to class B in class A? - c ++Java: How can a class of a class constructor class neutralize the parent constructor? - javaAll Articles