PHP study notes: php network traffic statistics system _ PHP Tutorial

Source: Internet
Author: User
PHP learning notes: php network traffic statistics system. PHP learning notes: php network traffic statistics system description: the code is from the book PHP and MySQLWeb application development, and some code has been modified, all of my tests are available in PHP study notes: php network traffic statistics system
Note: the source of the code is PHP and MySQL Web application development. some of the code has been modified and can be used after my tests.

The IP address is displayed normally. My computer supports IPv6.

The database script in this example ~~~ Execute set names gbk first (because the script contains Chinese characters) and then execute the statement: source d: \ test \ Vote. SQL;

Create database if not exists FluxStatCOLLATE 'gb2312 _ chinese_ci '; USE FluxStat; create table if not exists WebInfo (Id INT AUTO_INCREMENT primary key, WebName VARCHAR (50), WebUrl VARCHAR (200 ), startTime DATETIME, nTotalNum INT, nDayMax INT); insert into WebInfo (WebName, WebUrl, StartTime, nTotalNum, nDayMax) VALUES ('traffic statistics system homepage ',' http://localhost/test3/FluxStat/index.php ', '2017-07-07, 0, 0); create table if not exists Visitors (Id INT AUTO_INCREMENT primary key, vTime DATETIME, vIP VARCHAR (50 ), vOS VARCHAR (50), vExp VARCHAR (50), vRef VARCHAR (50); create table if not exists FluxStat (Id INT AUTO_INCREMENT primary key, D1 INT, D2 INT, d3 INT, D4 INT, D5 INT, D6 INT, D7 INT, D8 INT, D9 INT, D10 INT, D11 INT, D12 INT, D13 INT, D14 INT, D15 INT, d16 INT, D17 INT, D18 INT, D19 INT, D20 INT, D21 INT, D22 INT, D23 INT, D24 INT, D25 INT, D26 INT, D27 INT, D28 INT, d29 INT, D30 INT, D31 INT, MTotalNum INT );

Style. CSS style code

The Class file contains three files: FluxStat. php (FluxStat Class), Visitors. php (Visitors Class), and WebInfo. php (WebInfo Class)

FluxStat. php stores website visits per day

Tips: The source of the code is PHP and MySQL Web application development, and some of the code has been modified. after my tests, all of them are available...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.