Tutorials to .com

Tutorials to .com » Asp » Skills » How to write ASP Web Statistics System 1

How to write ASP Web Statistics System 1

Print View , by: iSee ,Total views: 35 ,Word Count: 527 ,Date: Mon, 24 Aug 2009 Time: 10:00 AM

In the current web site statistics system must have most of them are CGI, but to write particularly complex, while the asp learn it simple, and more, and database combination of advantages, it has been done in conjunction with their web site statistics system, and we explore the ASP the preparation of site statistics systems.
NetEase Web sites you have seen statistical system, it can be statistical total number of visits, average daily visits, day visits, the highest number of visits, the highest date of the visit, Japan and traffic analysis, monthly traffic analysis, Zhou traffic analysis, the browser analysis of and so on.
In fact, to do a statistical system ASP access key is the system table structure design. And how to collect the user's CGI variables, how to display the user's information. That is the key to the system are two ASP programs, statistics programs and display program.
First, let's take a look at how to collect a user's access to information.
We have prepared a user to access statistics need to know the following information, visitor's IP (access to IP can be formed according to the visitor IP list), the visitor's browser and operating system (Statistics visitor's browser and operating system and all visitors to browse device with the operating system scale maps), the visitor's access time (to-day visit to traffic analysis, monthly traffic analysis, weekly traffic analysis), let's take a look at the information above with the ASP access to the statement:
1. Access to visitor IP
Dim M_IP
M_IP = Request.Servervariables ( "REMOTE_HOST")
The above statement can be used to obtain the visitor's IP.
2. Access to browser information
Dim O_Browser, M_BrowserType
Set O_Browser = Server.Createobject ( "MSWC.BrowserType")
M_BrowserType = O_Browser.Browser + O_Browser.Version
3. Obtain access time
Dim M_DateTime
M_DateTime = Year (Date ())&"/"& Right ( "0" & Month (Date ()), 2 )&"/" Right ( "0" & Day (Date ()), 2 )&"/"& Right ( "0" & Hour (Time ()), 2 )&":"& Right ( "0" & Minute (Time ()), 2 )&":"& Right ( "0" & Second (Time ()), 2)

More than a few statements we have to get the information, in order to determine convenience, take the current time using the above method.
Today, first wrote here, everyone is good response to the point:)
Below we talk about:
(B) the realization of a number of technical methods (3) How to design a table structure (d) how to design statistical ASP program (5) How to design a display of statistical data ASP program (6) optimization


ASP skills Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.