Actually I have to maintain a download table in Database for my all listed video at my site. That mean how many times m开发者_Python百科y different videos are downloaded by people. I did not know it actual function what to do and how to do. I am working in Java.
The normal way to determine how often things are downloaded is to analyse the web server's access logs. So my suggestion is to write a program (in Java or some other language) to analyse the access logs and add the results to a database table .
As you are new to Java, the following Java Tutorials will help you get started:
- Getting Started - explains how to compile and run Java programs.
- Learning the Language - covers the fundamentals of the Java language. Alternatively, there are lots of textbooks that are suitable for beginners, or for people switching to Java from other languages
- Basic I/O - covers such things as opening a file, reading it line by line, and splitting a line using
Scanner
. - JDBC Database Access - covers such things as connecting to the database and inserting rows into a table.
The other issue you may need to deal with is configuring your web server to create an access log in the first place. This will depend on the web server or application container that you are using to serve the downloaded files ...
精彩评论