开发者

how many times a file has been downloaded

I am creating a web browser using C#, and I need to get specific data from the web pages that are loaded in my browser.

The pages I am loading is a download scripts. The data I want to get is: the number of times the file has been downloaded.

I want to save this value in text.

What code can I use for this, or where can I start开发者_JAVA百科? Any help is appreciated.


Most web browsers have their own storage. Mozilla uses SQLite for some things.

Whenever your app/browser needs to retrieve a remote resource (URL of any kind), simply log it to a database table.

Perhaps use SQLite yourself for this. A decent start would be to create a history table like this:

URL           --varchar(max)
LastAccessed  --datetime
TotalRequests --int


If it is a file that the users will be downloading, you could add a global static int and increment it every time the file is downloaded.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜