代码拉取完成,页面将自动刷新
同步操作将从 WM Jonssen/百夫长统计 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
/*!
* ATTENTION: THIS FREE LICENSE IS ONLY FOR PERSONAL NON-COMMERCIAL USER. FOR COMMERCIAL PURPOSES, PLEASE PURCHASE A COMMERCIAL LICENSE! *
* module: Centcount Analyticsb Free Kernel SQL PHP Code *
* version: 1.00 Free *
* author: WM Jonssen *
* date: 03/12/2018 *
* copyright 2015-2018 WM Jonssen <wm.jonssen@gmail.com> - All rights reserved.*
* license: Dual licensed under the Free License and Commercial License. *
* https://www.centcount.com *
*/
define('TB_CA_CREATE_TEXT', "(
RecordNo BIGINT NOT NULL DEFAULT 0 PRIMARY KEY,
VID BIGINT NOT NULL DEFAULT 0,
Step INT NOT NULL DEFAULT 0,
StatusCode INT NOT NULL DEFAULT 0,
DelaySecond INT NOT NULL DEFAULT 0,
ReadySecond INT NOT NULL DEFAULT 0,
LoadSecond INT NOT NULL DEFAULT 0,
OnlineSecond INT NOT NULL DEFAULT 0,
MaxReadX TINYINT NOT NULL DEFAULT 0,
MaxReadY TINYINT NOT NULL DEFAULT 0,
PageAction TINYINT NOT NULL DEFAULT 0,
ClientTime BIGINT NOT NULL DEFAULT 0,
PageViews INT NOT NULL DEFAULT 0,
TotalPageViews INT NOT NULL DEFAULT 0,
Visits INT NOT NULL DEFAULT 0,
TotalVisits INT NOT NULL DEFAULT 0,
LastVisitTime BIGINT NOT NULL DEFAULT 0,
Title VARCHAR(512) NOT NULL DEFAULT '',
TitleMD5 VARCHAR(32) NOT NULL DEFAULT '',
Page VARCHAR(1024) NOT NULL DEFAULT '',
PageMD5 VARCHAR(32) NOT NULL DEFAULT '',
PageDomain VARCHAR(128) NOT NULL DEFAULT '',
PDMD5 VARCHAR(32) NOT NULL DEFAULT '',
Referrer VARCHAR(3072) NOT NULL DEFAULT '',
RFMD5 VARCHAR(32) NOT NULL DEFAULT '',
RefDomain VARCHAR(128) NOT NULL DEFAULT '',
RDMD5 VARCHAR(32) NOT NULL DEFAULT '',
SE VARCHAR(64) NOT NULL DEFAULT '',
SEName VARCHAR(32) NOT NULL DEFAULT '',
Keyword VARCHAR(128) NOT NULL DEFAULT '',
KWMD5 VARCHAR(32) NOT NULL DEFAULT '',
FromType TINYINT NOT NULL DEFAULT 0,
FromKey VARCHAR(128) NOT NULL DEFAULT '',
FromKeyMD5 VARCHAR(32) NOT NULL DEFAULT '',
FromVal VARCHAR(1024) NOT NULL DEFAULT '',
FromValMD5 VARCHAR(32) NOT NULL DEFAULT '',
UTMSource VARCHAR(32) NOT NULL DEFAULT '',
UTMMedium VARCHAR(32) NOT NULL DEFAULT '',
UTMTerm VARCHAR(128) NOT NULL DEFAULT '',
UTMContent VARCHAR(64) NOT NULL DEFAULT '',
UTMCampaign VARCHAR(64) NOT NULL DEFAULT '',
UserAgent VARCHAR(512) NOT NULL DEFAULT '',
Platform VARCHAR(32) NOT NULL DEFAULT '',
AppName VARCHAR(32) NOT NULL DEFAULT '',
OS VARCHAR(32) NOT NULL DEFAULT '',
OSCodename VARCHAR(32) NOT NULL DEFAULT '',
OSVersion VARCHAR(32) NOT NULL DEFAULT '',
OSVersionN FLOAT NOT NULL DEFAULT 0,
CPU VARCHAR(16) NOT NULL DEFAULT '',
Device VARCHAR(32) NOT NULL DEFAULT '',
DeviceType TINYINT NOT NULL DEFAULT 0,
Brand VARCHAR(32) NOT NULL DEFAULT '',
Model VARCHAR(32) NOT NULL DEFAULT '',
Spider VARCHAR(32) NOT NULL DEFAULT '',
ScreenWidth INT NOT NULL DEFAULT 0,
ScreenHeight INT NOT NULL DEFAULT 0,
ColorDepth TINYINT NOT NULL DEFAULT 0,
TouchScreen TINYINT NOT NULL DEFAULT 0,
Plugin VARCHAR(2048) NOT NULL DEFAULT '',
Language VARCHAR(16) NOT NULL DEFAULT '',
BrowserName VARCHAR(32) NOT NULL DEFAULT '',
BrowserVersion VARCHAR(32) NOT NULL DEFAULT '',
BrowserVersionN FLOAT NOT NULL DEFAULT 0,
BrowserCore VARCHAR(16) NOT NULL DEFAULT '',
BrowserCoreVersion VARCHAR(32) NOT NULL DEFAULT '',
BrowserCoreVersionN FLOAT NOT NULL DEFAULT 0,
CookieEnabled TINYINT NOT NULL DEFAULT 0,
IP VARCHAR(15) NOT NULL DEFAULT '',
NIP BIGINT NOT NULL DEFAULT 0,
Country VARCHAR(64) NOT NULL DEFAULT '',
CountryMD5 VARCHAR(32) NOT NULL DEFAULT '',
Region VARCHAR(64) NOT NULL DEFAULT '',
RegionMD5 VARCHAR(32) NOT NULL DEFAULT '',
City VARCHAR(64) NOT NULL DEFAULT '',
CityMD5 VARCHAR(32) NOT NULL DEFAULT '',
ISP VARCHAR(128) NOT NULL DEFAULT '',
ISPMD5 VARCHAR(32) NOT NULL DEFAULT '',
Latitude FLOAT NOT NULL DEFAULT 0,
Longitude FLOAT NOT NULL DEFAULT 0,
CountryISO VARCHAR(2) NOT NULL DEFAULT '',
ContinentISO VARCHAR(2) NOT NULL DEFAULT '',
ScrollWidth INT NOT NULL DEFAULT 0,
ScrollHeight INT NOT NULL DEFAULT 0,
ScrollLeft INT NOT NULL DEFAULT 0,
ScrollTop INT NOT NULL DEFAULT 0,
MinReadX TINYINT NOT NULL DEFAULT 0,
MinReadY TINYINT NOT NULL DEFAULT 0,
ClientWidth INT NOT NULL DEFAULT 0,
ClientHeight INT NOT NULL DEFAULT 0,
ClientLeft INT NOT NULL DEFAULT 0,
ClientTop INT NOT NULL DEFAULT 0,
IsUTM TINYINT NOT NULL DEFAULT 0,
IsPV TINYINT NOT NULL DEFAULT 1,
IsUPV TINYINT NOT NULL DEFAULT 0,
IsNVS TINYINT NOT NULL DEFAULT 0,
IsRVS TINYINT NOT NULL DEFAULT 0,
IsRBT TINYINT NOT NULL DEFAULT 0,
IsUV TINYINT NOT NULL DEFAULT 0,
IsNV TINYINT NOT NULL DEFAULT 0,
IsRV TINYINT NOT NULL DEFAULT 0,
IsBounce TINYINT NOT NULL DEFAULT 1,
IsExit TINYINT NOT NULL DEFAULT 1,
IsFakeData TINYINT NOT NULL DEFAULT 0,
EntryCode TINYINT NOT NULL DEFAULT 0,
ExitCode TINYINT NOT NULL DEFAULT 0,
LastRN BIGINT NOT NULL DEFAULT 0,
LastStatus INT NOT NULL DEFAULT 0,
Clicks INT NOT NULL DEFAULT 0,
ValidClicks INT NOT NULL DEFAULT 0,
RecordTime INT NOT NULL DEFAULT 0,
UpdateTime BIGINT NOT NULL DEFAULT 0,
INDEX indexVID (VID),
INDEX indexNIP (NIP),
INDEX indexUT (UpdateTime))");
define('TB_VA_CREATE_TEXT', "(
pKey INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
VID BIGINT NOT NULL DEFAULT 0,
RecordNo BIGINT NOT NULL DEFAULT 0,
DeviceType TINYINT NOT NULL DEFAULT 0,
FromType TINYINT NOT NULL DEFAULT 0,
UAR INT NOT NULL DEFAULT 0,
VA1 VARCHAR(5120) NOT NULL DEFAULT '',
VA2 VARCHAR(5120) NOT NULL DEFAULT '',
VA3 VARCHAR(5120) NOT NULL DEFAULT '',
VA4 VARCHAR(5120) NOT NULL DEFAULT '',
RecordTime INT NOT NULL DEFAULT 0,
UNIQUE uniqueUpdate (RecordNo, UAR),
INDEX indexVID (VID))");
define('TB_VC_CREATE_TEXT', "(
pKey INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
VID BIGINT NOT NULL DEFAULT 0,
RecordNo BIGINT NOT NULL DEFAULT 0,
DeviceType TINYINT NOT NULL DEFAULT 0,
FromType TINYINT NOT NULL DEFAULT 0,
FromKey VARCHAR(128) NOT NULL DEFAULT '',
FromKeyMD5 VARCHAR(32) NOT NULL DEFAULT '',
FromVal VARCHAR(1024) NOT NULL DEFAULT '',
FromValMD5 VARCHAR(32) NOT NULL DEFAULT '',
UTMSource VARCHAR(32) NOT NULL DEFAULT '',
UTMMedium VARCHAR(32) NOT NULL DEFAULT '',
UTMTerm VARCHAR(128) NOT NULL DEFAULT '',
UTMContent VARCHAR(64) NOT NULL DEFAULT '',
UTMCampaign VARCHAR(64) NOT NULL DEFAULT '',
TotalPageViews INT NOT NULL DEFAULT 0,
UCR INT NOT NULL DEFAULT 0,
MX INT NOT NULL DEFAULT 0,
MY INT NOT NULL DEFAULT 0,
X INT NOT NULL DEFAULT 0,
Y INT NOT NULL DEFAULT 0,
ClientWidth INT NOT NULL DEFAULT 0,
ClientHeight INT NOT NULL DEFAULT 0,
ClientLeft INT NOT NULL DEFAULT 0,
ClientTop INT NOT NULL DEFAULT 0,
Page VARCHAR(1024) NOT NULL DEFAULT '',
PageMD5 VARCHAR(32) NOT NULL DEFAULT '',
NodeActionType TINYINT NOT NULL DEFAULT 0,
NodeIDMD5 VARCHAR(32) NOT NULL DEFAULT '',
NodeHtmlMD5 VARCHAR(32) NOT NULL DEFAULT '',
NodeTagMD5 VARCHAR(32) NOT NULL DEFAULT '',
NodeNodeMD5 VARCHAR(32) NOT NULL DEFAULT '',
NodeHref VARCHAR(1024) NOT NULL DEFAULT '',
NodeHrefMD5 VARCHAR(32) NOT NULL DEFAULT '',
NodeText VARCHAR(256) NOT NULL DEFAULT '',
NodeRepeatClick TINYINT NOT NULL DEFAULT 0,
RecordTime INT NOT NULL DEFAULT 0,
UNIQUE uniqueUpdate (RecordNo, UCR),
INDEX indexPg (PageMD5),
INDEX indexVID (VID),
INDEX indexIDMD5 (NodeIDMD5),
INDEX indexHtmlMD5 (NodeHtmlMD5),
INDEX indexNodeMD5 (NodeNodeMD5),
INDEX indexHrefMD5 (NodeHrefMD5))");
define('TB_VID_CREATE_TEXT', '(
VID BIGINT NOT NULL DEFAULT 0 PRIMARY KEY,
RecordNo BIGINT NOT NULL DEFAULT 0,
UNIQUE uniqueRN (RecordNo))');
define('TB_IND_CREATE_TEXT', "(
MD5 VARCHAR(33) NOT NULL DEFAULT '' PRIMARY KEY,
Type TINYINT NOT NULL DEFAULT 0,
PV INT NOT NULL DEFAULT 0,
UPV INT NOT NULL DEFAULT 0,
RVS INT NOT NULL DEFAULT 0,
UV INT NOT NULL DEFAULT 0,
NV INT NOT NULL DEFAULT 0,
RV INT NOT NULL DEFAULT 0,
Visits INT NOT NULL DEFAULT 0,
Bounces INT NOT NULL DEFAULT 0,
BounceRate INT NOT NULL DEFAULT 0,
Exits INT NOT NULL DEFAULT 0,
ExitRate INT NOT NULL DEFAULT 0,
TotalReady BIGINT NOT NULL DEFAULT 0,
ReadyTimes INT NOT NULL DEFAULT 0,
AvgReady INT NOT NULL DEFAULT 0,
TotalLoad BIGINT NOT NULL DEFAULT 0,
LoadTimes INT NOT NULL DEFAULT 0,
AvgLoad INT NOT NULL DEFAULT 0,
TotalOnline BIGINT NOT NULL DEFAULT 0,
OnlineTimes INT NOT NULL DEFAULT 0,
AvgOnline INT NOT NULL DEFAULT 0,
TotalDelay BIGINT NOT NULL DEFAULT 0,
DelayTimes INT NOT NULL DEFAULT 0,
AvgDelay INT NOT NULL DEFAULT 0,
MaxReadX BIGINT NOT NULL DEFAULT 0,
MaxReadY BIGINT NOT NULL DEFAULT 0,
MRTimes INT NOT NULL DEFAULT 0,
AvgMRX INT NOT NULL DEFAULT 0,
AvgMRY INT NOT NULL DEFAULT 0,
DREntry INT NOT NULL DEFAULT 0,
SEEntry INT NOT NULL DEFAULT 0,
RFEntry INT NOT NULL DEFAULT 0,
Detail VARCHAR(2048) NOT NULL DEFAULT '',
Clicks INT NOT NULL DEFAULT 0,
ValidClicks INT NOT NULL DEFAULT 0,
Extra VARCHAR(255) NOT NULL DEFAULT '',
ExtraMD5 VARCHAR(33) NOT NULL DEFAULT '',
INDEX indexSort (Type,PV),
INDEX indexExtra (ExtraMD5))");
function INIT_CA() {
static $CA_ARRAY = array(
'Step' => 0,
'StatusCode' => 0,
'VID' => '',
'RecordNo' => 0,
'DelaySecond' => 0,
'ReadySecond' => 0,
'LoadSecond' => 0,
'OnlineSecond' => 0,
'MinReadX' => 0,
'MinReadY' => 0,
'MaxReadX' => 0,
'MaxReadY' => 0,
'PageAction' => 0,
'ClientTime' => 0,
'PageViews' => 0,
'TotalPageViews' => 0,
'Visits' => 1,
'TotalVisits' => 1,
'Charset' => '',
'Title' => '',
'Page' => '',
'Referrer' => '',
'SE' => '',
'SEName' => '',
'Keyword' => '',
'UserAgent' => '',
'Platform' => '',
'AppName' => '',
'OS' => '',
'OSCodename' => '',
'OSVersion' => '',
'OSVersionN' => '',
'CPU' => '',
'Device' => '',
'DeviceType' => 0,
'Brand' => '',
'Model' => '',
'SmartPhone' => '',
'Spider' => '',
'ScreenWidth' => 0,
'ScreenHeight' => 0,
'ColorDepth' => 0,
'Plugin' => '',
'Language' => '',
'BrowserName' => '',
'BrowserVersion' => '',
'BrowserVersionN' => 0,
'BrowserCore' => '',
'BrowserCoreVersion' => '',
'BrowserCoreVersionN' => 0,
'CookieEnabled' => -1,
'IP' => '',
'NIP' => 0,
'Country' => 'Unknown',
'CountryMD5' => 'Unknown',
'Region' => 'Unknown',
'RegionMD5' => 'Unknown',
'City' => 'Unknown',
'CityMD5' => 'Unknown',
'ISP' => 'Unknown',
'ISPMD5' => 'Unknown',
'Latitude' => 0,
'Longitude' => 0,
'CountryISO' => '',
'ContinentISO' => '',
'ScrollWidth' => 0,
'ScrollHeight' => 0,
'ScrollLeft' => 0,
'ScrollTop' => 0,
'ClientWidth' => 0,
'ClientHeight' => 0,
'ClientLeft' => 0,
'ClientTop' => 0,
'IsUTM' => 0,
'IsPV' => 1,
'IsUPV' => 1,
'IsNVS' => 0,
'IsRVS' => 0,
'IsRBT' => 0,
'IsUV' => 0,
'IsNV' => 0,
'IsRV' => 0,
'IsBounce' => 1,
'IsExit' => 1,
'IsFakeData' => 0,
'EntryCode' => 0,
'ExitCode' => 0,
'EntryTpye' => 0,
'ExitType' => 0,
'LastRN' => 0,
'TitleMD5' => '',
'PageMD5' => '',
'RFMD5' => '',
'KWMD5' => '',
'PageDomain' => '',
'PDMD5' => '',
'RefDomain' => '',
'RDMD5' => '',
'FromType' => 0,
'FromKey' => '',
'FromKeyMD5' => '',
'FromVal' => '',
'FromValMD5' => '',
'UTMSource' => '',
'UTMMedium' => '',
'UTMTerm' => '',
'UTMContent' => '',
'UTMCampaign' => '',
'RecordTime' => 0,
'UpdateTime' => 0,
'LastStatus' => 0,
'Clicks' => 0,
'ValidClicks' => 0,
'UAR' => 0,
'UAS' => 0,
'VA' => '',
'UCR' => 0,
'MX' => 0,
'MY' => 0,
'X' => 0,
'Y' => 0,
'NodeActionType' => 0,
'NodeIDMD5' => '',
'NodeHtmlMD5' => '',
'NodeTagMD5' => '',
'NodeNodeMD5' => '',
'NodeHref' => '',
'NodeHrefMD5' => '',
'NodeText' => '',
'NodeRepeatClick' => 0
);
return $CA_ARRAY;
}
function get_redis_array($a, &$CA) {
switch ($a) {
case "ca_insert":
return array(
'UpdateTime' => $CA['UpdateTime'],
'RecordNo' => $CA['RecordNo'],
'VID' => $CA['VID'],
'Step' => $CA['Step'],
'StatusCode' => $CA['StatusCode'],
'ClientTime' => $CA['ClientTime'],
'DelaySecond' => $CA['DelaySecond'],
'ReadySecond' => $CA['ReadySecond'],
'LoadSecond' => $CA['LoadSecond'],
'OnlineSecond' => $CA['OnlineSecond'],
'MaxReadX' => $CA['MaxReadX'],
'MaxReadY' => $CA['MaxReadY'],
'PageAction' => $CA['PageAction'],
'PageViews' => $CA['PageViews'],
'TotalPageViews' => $CA['TotalPageViews'],
'Visits' => $CA['Visits'],
'TotalVisits' => $CA['TotalVisits'],
'LastVisitTime' => $CA['LastVisitTime'],
'Title' => $CA['Title'],
'TitleMD5' => $CA['TitleMD5'],
'Page' => $CA['Page'],
'PageMD5' => $CA['PageMD5'],
'PageDomain' => $CA['PageDomain'],
'PDMD5' => $CA['PDMD5'],
'Referrer' => $CA['Referrer'],
'RFMD5' => $CA['RFMD5'],
'RefDomain' => $CA['RefDomain'],
'RDMD5' => $CA['RDMD5'],
'SE' => $CA['SE'],
'SEName' => $CA['SEName'],
'Keyword' => $CA['Keyword'],
'KWMD5' => $CA['KWMD5'],
'FromType' => $CA['FromType'],
'FromKey' => $CA['FromKey'],
'FromKeyMD5' => $CA['FromKeyMD5'],
'FromVal' => $CA['FromVal'],
'FromValMD5' => $CA['FromValMD5'],
'UTMSource' => $CA['UTMSource'],
'UTMMedium' => $CA['UTMMedium'],
'UTMTerm' => $CA['UTMTerm'],
'UTMContent' => $CA['UTMContent'],
'UTMCampaign' => $CA['UTMCampaign'],
'UserAgent' => $CA['UserAgent'],
'Platform' => $CA['Platform'],
'AppName' => $CA['AppName'],
'OS' => $CA['OS'],
'OSCodename' => $CA['OSCodename'],
'OSVersion' => $CA['OSVersion'],
'OSVersionN' => $CA['OSVersionN'],
'CPU' => $CA['CPU'],
'Device' => $CA['Device'],
'DeviceType' => $CA['DeviceType'],
'Brand' => $CA['Brand'],
'Model' => $CA['Model'],
'Spider' => $CA['Spider'],
'ScreenWidth' => $CA['ScreenWidth'],
'ScreenHeight' => $CA['ScreenHeight'],
'ColorDepth' => $CA['ColorDepth'],
'TouchScreen' => $CA['TouchScreen'],
'Plugin' => $CA['Plugin'],
'Language' => $CA['Language'],
'BrowserName' => $CA['BrowserName'],
'BrowserVersion' => $CA['BrowserVersion'],
'BrowserVersionN' => $CA['BrowserVersionN'],
'BrowserCore' => $CA['BrowserCore'],
'BrowserCoreVersion' => $CA['BrowserCoreVersion'],
'BrowserCoreVersionN' => $CA['BrowserCoreVersionN'],
'CookieEnabled' => $CA['CookieEnabled'],
'IP' => $CA['IP'],
'NIP' => $CA['NIP'],
'Country' => $CA['Country'],
'CountryMD5' => $CA['CountryMD5'],
'Region' => $CA['Region'],
'RegionMD5' => $CA['RegionMD5'],
'City' => $CA['City'],
'CityMD5' => $CA['CityMD5'],
'ISP' => $CA['ISP'],
'ISPMD5' => $CA['ISPMD5'],
'Latitude' => $CA['Latitude'],
'Longitude' => $CA['Longitude'],
'CountryISO' => $CA['CountryISO'],
'ContinentISO' => $CA['ContinentISO'],
'ScrollWidth' => $CA['ScrollWidth'],
'ScrollHeight' => $CA['ScrollHeight'],
'ScrollLeft' => $CA['ScrollLeft'],
'ScrollTop' => $CA['ScrollTop'],
'MinReadX' => $CA['MinReadX'],
'MinReadY' => $CA['MinReadY'],
'ClientWidth' => $CA['ClientWidth'],
'ClientHeight' => $CA['ClientHeight'],
'ClientLeft' => $CA['ClientLeft'],
'ClientTop' => $CA['ClientTop'],
'IsUTM' => $CA['IsUTM'],
'IsPV' => $CA['IsPV'],
'IsUPV' => $CA['IsUPV'],
'IsNVS' => $CA['IsNVS'],
'IsRVS' => $CA['IsRVS'],
'IsRBT' => $CA['IsRBT'],
'IsUV' => $CA['IsUV'],
'IsNV' => $CA['IsNV'],
'IsRV' => $CA['IsRV'],
'IsBounce' => $CA['IsBounce'],
'IsExit' => $CA['IsExit'],
'IsFakeData' => $CA['IsFakeData'],
'EntryCode' => $CA['EntryCode'],
'ExitCode' => $CA['ExitCode'],
'LastRN' => $CA['LastRN'],
'LastStatus' => $CA['StatusCode'],
'Clicks' => 0,
'ValidClicks' => 0,
'RecordTime' => $CA['RecordTime'],
'LUT' => 1);
case "ca_update":
return array(
'RecordNo' => $CA['RecordNo'],
'VID' => $CA['VID'],
'StatusCode' => $CA['StatusCode'],
'ClientTime' => $CA['ClientTime'],
'PageAction' => $CA['PageAction'],
'PageViews' => $CA['PageViews'],
'TotalPageViews' => $CA['TotalPageViews'],
'Visits' => $CA['Visits'],
'TotalVisits' => $CA['TotalVisits'],
'LastVisitTime' => $CA['LastVisitTime'],
'Page' => $CA['Page'],
'PageMD5' => $CA['PageMD5'],
'PageDomain' => $CA['PageDomain'],
'PDMD5' => $CA['PDMD5'],
'Referrer' => $CA['Referrer'],
'RFMD5' => $CA['RFMD5'],
'RefDomain' => $CA['RefDomain'],
'RDMD5' => $CA['RDMD5'],
'SE' => $CA['SE'],
'SEName' => $CA['SEName'],
'Keyword' => $CA['Keyword'],
'KWMD5' => $CA['KWMD5'],
'FromType' => $CA['FromType'],
'FromKey' => $CA['FromKey'],
'FromKeyMD5' => $CA['FromKeyMD5'],
'FromVal' => $CA['FromVal'],
'FromValMD5' => $CA['FromValMD5'],
'UTMSource' => $CA['UTMSource'],
'UTMMedium' => $CA['UTMMedium'],
'UTMTerm' => $CA['UTMTerm'],
'UTMContent' => $CA['UTMContent'],
'UTMCampaign' => $CA['UTMCampaign'],
'UserAgent' => $CA['UserAgent'],
'Platform' => $CA['Platform'],
'AppName' => $CA['AppName'],
'OS' => $CA['OS'],
'OSCodename' => $CA['OSCodename'],
'OSVersion' => $CA['OSVersion'],
'OSVersionN' => $CA['OSVersionN'],
'CPU' => $CA['CPU'],
'Device' => $CA['Device'],
'DeviceType' => $CA['DeviceType'],
'Brand' => $CA['Brand'],
'Model' => $CA['Model'],
'Spider' => $CA['Spider'],
'ScreenWidth' => $CA['ScreenWidth'],
'ScreenHeight' => $CA['ScreenHeight'],
'ColorDepth' => $CA['ColorDepth'],
'TouchScreen' => $CA['TouchScreen'],
'Plugin' => $CA['Plugin'],
'Language' => $CA['Language'],
'BrowserName' => $CA['BrowserName'],
'BrowserVersion' => $CA['BrowserVersion'],
'BrowserVersionN' => $CA['BrowserVersionN'],
'BrowserCore' => $CA['BrowserCore'],
'BrowserCoreVersion' => $CA['BrowserCoreVersion'],
'BrowserCoreVersionN' => $CA['BrowserCoreVersionN'],
'CookieEnabled' => $CA['CookieEnabled'],
'IP' => $CA['IP'],
'NIP' => $CA['NIP'],
'Country' => $CA['Country'],
'CountryMD5' => $CA['CountryMD5'],
'Region' => $CA['Region'],
'RegionMD5' => $CA['RegionMD5'],
'City' => $CA['City'],
'CityMD5' => $CA['CityMD5'],
'ISP' => $CA['ISP'],
'ISPMD5' => $CA['ISPMD5'],
'Latitude' => $CA['Latitude'],
'Longitude' => $CA['Longitude'],
'CountryISO' => $CA['CountryISO'],
'ContinentISO' => $CA['ContinentISO'],
'IsUTM' => $CA['IsUTM'],
'IsPV' => $CA['IsPV'],
'IsUPV' => $CA['IsUPV'],
'IsNVS' => $CA['IsNVS'],
'IsRVS' => $CA['IsRVS'],
'IsRBT' => $CA['IsRBT'],
'IsUV' => $CA['IsUV'],
'IsNV' => $CA['IsNV'],
'IsRV' => $CA['IsRV'],
'IsBounce' => $CA['IsBounce'],
'IsExit' => $CA['IsExit'],
'IsFakeData' => $CA['IsFakeData'],
'EntryCode' => $CA['EntryCode'],
'ExitCode' => $CA['ExitCode'],
'LastRN' => $CA['LastRN'],
'Clicks' => 0,
'ValidClicks' => 0,
'RecordTime' => $CA['RecordTime'],
'LUT' => 1);
case "ca_ready":
return array(
'UpdateTime' => $CA['UpdateTime'],
'Step' => $CA['Step'],
'DelaySecond' => $CA['DelaySecond'],
'ReadySecond' => $CA['ReadySecond'],
'LoadSecond' => $CA['LoadSecond'],
'OnlineSecond' => $CA['OnlineSecond'],
'MaxReadX' => $CA['MaxReadX'],
'MaxReadY' => $CA['MaxReadY'],
'PageAction' => $CA['PageAction'],
'Title' => $CA['Title'],
'TitleMD5' => $CA['TitleMD5'],
'ScrollWidth' => $CA['ScrollWidth'],
'ScrollHeight' => $CA['ScrollHeight'],
'ScrollLeft' => $CA['ScrollLeft'],
'ScrollTop' => $CA['ScrollTop'],
'MinReadX' => $CA['MinReadX'],
'MinReadY' => $CA['MinReadY'],
'ClientWidth' => $CA['ClientWidth'],
'ClientHeight' => $CA['ClientHeight'],
'ClientLeft' => $CA['ClientLeft'],
'ClientTop' => $CA['ClientTop'],
'LastStatus' => $CA['StatusCode']
);
case "ca_beat":
return array(
'UpdateTime' => $CA['UpdateTime'],
'Step' => $CA['Step'],
'DelaySecond' => $CA['DelaySecond'],
'ReadySecond' => $CA['ReadySecond'],
'LoadSecond' => $CA['LoadSecond'],
'OnlineSecond' => $CA['OnlineSecond'],
'MinReadX' => $CA['MinReadX'],
'MinReadY' => $CA['MinReadY'],
'MaxReadX' => $CA['MaxReadX'],
'MaxReadY' => $CA['MaxReadY'],
'PageAction' => $CA['PageAction'],
'LastStatus' => $CA['StatusCode']
);
case "ca_beat_exit":
return array(
'UpdateTime' => $CA['UpdateTime'],
'Step' => $CA['Step'],
'DelaySecond' => $CA['DelaySecond'],
'ReadySecond' => $CA['ReadySecond'],
'LoadSecond' => $CA['LoadSecond'],
'OnlineSecond' => $CA['OnlineSecond'],
'MinReadX' => $CA['MinReadX'],
'MinReadY' => $CA['MinReadY'],
'MaxReadX' => $CA['MaxReadX'],
'MaxReadY' => $CA['MaxReadY'],
'PageAction' => $CA['PageAction'],
'ExitCode' => $CA['ExitCode'],
'LastStatus' => $CA['StatusCode']
);
case "va_insert":
return array(
'VID' => $CA['VID'],
'RecordNo' => $CA['RecordNo'],
'DeviceType' => $CA['DeviceType'],
'FromType' => $CA['FromType'],
'UAR' => $CA['UAR'],
'RecordTime' => $CA['RecordTime'],
'LUT' => 1
);
case "vc_insert":
return array(
'VID' => $CA['VID'],
'RecordNo' => $CA['RecordNo'],
'DeviceType' => $CA['DeviceType'],
'FromType' => $CA['FromType'],
'FromKey' => $CA['FromKey'],
'FromKeyMD5' => $CA['FromKeyMD5'],
'FromVal' => $CA['FromVal'],
'FromValMD5' => $CA['FromValMD5'],
'UTMSource' => $CA['UTMSource'],
'UTMMedium' => $CA['UTMMedium'],
'UTMTerm' => $CA['UTMTerm'],
'UTMContent' => $CA['UTMContent'],
'UTMCampaign' => $CA['UTMCampaign'],
'TotalPageViews' => $CA['TotalPageViews'],
'UCR' => $CA['UCR'],
'MX' => $CA['MX'],
'MY' => $CA['MY'],
'X' => $CA['X'],
'Y' => $CA['Y'],
'ClientWidth' => $CA['ClientWidth'],
'ClientHeight' => $CA['ClientHeight'],
'ClientLeft' => $CA['ClientLeft'],
'ClientTop' => $CA['ClientTop'],
'Page' => $CA['Page'],
'PageMD5' => $CA['PageMD5'],
'NodeActionType' => $CA['NodeActionType'],
'NodeIDMD5' => $CA['NodeIDMD5'],
'NodeHtmlMD5' => $CA['NodeHtmlMD5'],
'NodeTagMD5' => $CA['NodeTagMD5'],
'NodeNodeMD5' => $CA['NodeNodeMD5'],
'NodeHref' => $CA['NodeHref'],
'NodeHrefMD5' => $CA['NodeHrefMD5'],
'NodeText' => $CA['NodeText'],
'NodeRepeatClick' => $CA['NodeRepeatClick'],
'RecordTime' => $CA['RecordTime']
);
}
return '';
}
function init_ind_insert($name, $type=0) {
return array(
'MD5' => $name,
'Type' => $type,
'PV' => 0,
'UV' => 0,
'UPV' => 0,
'RVS' => 0,
'NV' => 0,
'RV' => 0,
'Visits' => 0,
'Bounces' => 0,
'Exits' => 0,
'DREntry' => 0,
'SEEntry' => 0,
'RFEntry' => 0,
'Detail' => '',
'Extra' => '',
'ExtraMD5' => '',
'TotalReady' => 0,
'ReadyTimes' => 0,
'TotalLoad' => 0,
'LoadTimes' => 0,
'TotalOnline' => 0,
'OnlineTimes' => 0,
'TotalDelay' => 0,
'DelayTimes' => 0,
'MaxReadX' => 0,
'MaxReadY' => 0,
'MRTimes' => 0,
'Clicks' => 0,
'ValidClicks' => 0,
'LUT' => 1
);
}
define('CA_INSERT','(
UpdateTime,
RecordNo,
VID,
Step,
StatusCode,
ClientTime,
DelaySecond,
ReadySecond,
LoadSecond,
OnlineSecond,
MaxReadX,
MaxReadY,
PageAction,
PageViews,
TotalPageViews,
Visits,
TotalVisits,
LastVisitTime,
Title,
TitleMD5,
Page,
PageMD5,
PageDomain,
PDMD5,
Referrer,
RFMD5,
RefDomain,
RDMD5,
SE,
SEName,
Keyword,
KWMD5,
FromType,
FromKey,
FromKeyMD5,
FromVal,
FromValMD5,
UTMSource,
UTMMedium,
UTMTerm,
UTMContent,
UTMCampaign,
UserAgent,
Platform,
AppName,
OS,
OSCodename,
OSVersion,
OSVersionN,
CPU,
Device,
DeviceType,
Brand,
Model,
Spider,
ScreenWidth,
ScreenHeight,
ColorDepth,
TouchScreen,
Plugin,
Language,
BrowserName,
BrowserVersion,
BrowserVersionN,
BrowserCore,
BrowserCoreVersion,
BrowserCoreVersionN,
CookieEnabled,
IP,
NIP,
Country,
CountryMD5,
Region,
RegionMD5,
City,
CityMD5,
ISP,
ISPMD5,
Latitude,
Longitude,
CountryISO,
ContinentISO,
ScrollWidth,
ScrollHeight,
ScrollLeft,
ScrollTop,
MinReadX,
MinReadY,
ClientWidth,
ClientHeight,
ClientLeft,
ClientTop,
IsUTM,
IsPV,
IsUPV,
IsNVS,
IsRVS,
IsRBT,
IsUV,
IsNV,
IsRV,
IsBounce,
IsExit,
IsFakeData,
EntryCode,
ExitCode,
LastRN,
LastStatus,
Clicks,
ValidClicks,
RecordTime
)');
define('IND_INSERT','(
MD5,
Type,
PV,
UPV,
RVS,
UV,
NV,
RV,
Visits,
Bounces,
BounceRate,
Exits,
ExitRate,
TotalReady,
ReadyTimes,
AvgReady,
TotalLoad,
LoadTimes,
AvgLoad,
TotalOnline,
OnlineTimes,
AvgOnline,
TotalDelay,
DelayTimes,
AvgDelay,
MaxReadX,
MaxReadY,
MRTimes,
AvgMRX,
AvgMRY,
DREntry,
SEEntry,
RFEntry,
Detail,
Clicks,
ValidClicks,
Extra,
ExtraMD5
)');
define('VC_INSERT','(
VID,
RecordNo,
DeviceType,
FromType,
FromKey,
FromKeyMD5,
FromVal,
FromValMD5,
UTMSource,
UTMMedium,
UTMTerm,
UTMContent,
UTMCampaign,
TotalPageViews,
UCR,
MX,
MY,
X,
Y,
ClientWidth,
ClientHeight,
ClientLeft,
ClientTop,
Page,
PageMD5,
NodeActionType,
NodeIDMD5,
NodeHtmlMD5,
NodeTagMD5,
NodeNodeMD5,
NodeHref,
NodeHrefMD5,
NodeText,
NodeRepeatClick,
RecordTime
)');
function get_ca_insert_value(&$CA){
return "(
{$CA['UpdateTime']},
{$CA['RecordNo']},
{$CA['VID']},
{$CA['Step']},
{$CA['StatusCode']},
{$CA['ClientTime']},
{$CA['DelaySecond']},
{$CA['ReadySecond']},
{$CA['LoadSecond']},
{$CA['OnlineSecond']},
{$CA['MaxReadX']},
{$CA['MaxReadY']},
{$CA['PageAction']},
{$CA['PageViews']},
{$CA['TotalPageViews']},
{$CA['Visits']},
{$CA['TotalVisits']},
{$CA['LastVisitTime']},
'{$CA['Title']}',
'{$CA['TitleMD5']}',
'{$CA['Page']}',
'{$CA['PageMD5']}',
'{$CA['PageDomain']}',
'{$CA['PDMD5']}',
'{$CA['Referrer']}',
'{$CA['RFMD5']}',
'{$CA['RefDomain']}',
'{$CA['RDMD5']}',
'{$CA['SE']}',
'{$CA['SEName']}',
'{$CA['Keyword']}',
'{$CA['KWMD5']}',
{$CA['FromType']},
'{$CA['FromKey']}',
'{$CA['FromKeyMD5']}',
'{$CA['FromVal']}',
'{$CA['FromValMD5']}',
'{$CA['UTMSource']}',
'{$CA['UTMMedium']}',
'{$CA['UTMTerm']}',
'{$CA['UTMContent']}',
'{$CA['UTMCampaign']}',
'{$CA['UserAgent']}',
'{$CA['Platform']}',
'{$CA['AppName']}',
'{$CA['OS']}',
'{$CA['OSCodename']}',
'{$CA['OSVersion']}',
'{$CA['OSVersionN']}',
'{$CA['CPU']}',
'{$CA['Device']}',
'{$CA['DeviceType']}',
'{$CA['Brand']}',
'{$CA['Model']}',
'{$CA['Spider']}',
{$CA['ScreenWidth']},
{$CA['ScreenHeight']},
{$CA['ColorDepth']},
{$CA['TouchScreen']},
'{$CA['Plugin']}',
'{$CA['Language']}',
'{$CA['BrowserName']}',
'{$CA['BrowserVersion']}',
{$CA['BrowserVersionN']},
'{$CA['BrowserCore']}',
'{$CA['BrowserCoreVersion']}',
{$CA['BrowserCoreVersionN']},
{$CA['CookieEnabled']},
'{$CA['IP']}',
{$CA['NIP']},
'{$CA['Country']}',
'{$CA['CountryMD5']}',
'{$CA['Region']}',
'{$CA['RegionMD5']}',
'{$CA['City']}',
'{$CA['CityMD5']}',
'{$CA['ISP']}',
'{$CA['ISPMD5']}',
{$CA['Latitude']},
{$CA['Longitude']},
'{$CA['CountryISO']}',
'{$CA['ContinentISO']}',
{$CA['ScrollWidth']},
{$CA['ScrollHeight']},
{$CA['ScrollLeft']},
{$CA['ScrollTop']},
{$CA['MinReadX']},
{$CA['MinReadY']},
{$CA['ClientWidth']},
{$CA['ClientHeight']},
{$CA['ClientLeft']},
{$CA['ClientTop']},
{$CA['IsUTM']},
{$CA['IsPV']},
{$CA['IsUPV']},
{$CA['IsNVS']},
{$CA['IsRVS']},
{$CA['IsRBT']},
{$CA['IsUV']},
{$CA['IsNV']},
{$CA['IsRV']},
{$CA['IsBounce']},
{$CA['IsExit']},
{$CA['IsFakeData']},
{$CA['EntryCode']},
{$CA['ExitCode']},
{$CA['LastRN']},
{$CA['LastStatus']},
{$CA['Clicks']},
{$CA['ValidClicks']},
{$CA['RecordTime']})";
}
function get_ind_insert_value(&$CA) {
if (!isset($CA['Extra'])) $CA['Extra'] = '';
$CA['ExtraMD5'] = $CA['Extra'] ? tmd5($CA['Extra']) : '';
$CA['BounceRate'] = $CA['Visits'] ? (int)($CA['Bounces'] / $CA['Visits'] * 10000) : 0;
$CA['ExitRate'] = $CA['PV'] ? (int)($CA['Exits'] / $CA['PV'] * 10000) : 0;
$CA['AvgReady'] = $CA['ReadyTimes'] ? $CA['TotalReady'] / $CA['ReadyTimes'] : 0;
$CA['AvgLoad'] = $CA['LoadTimes'] ? $CA['TotalLoad'] / $CA['LoadTimes'] : 0;
$CA['AvgOnline'] = $CA['OnlineTimes'] ? $CA['TotalOnline'] / $CA['OnlineTimes'] : 0;
$CA['AvgDelay'] = $CA['DelayTimes'] ? $CA['TotalDelay'] / $CA['DelayTimes'] : 0;
$CA['AvgMRX'] = $CA['MRTimes'] ? $CA['MaxReadX'] / $CA['MRTimes'] : 0;
$CA['AvgMRY'] = $CA['MRTimes'] ? $CA['MaxReadY'] / $CA['MRTimes'] : 0;
return "(
'{$CA['MD5']}',
{$CA['Type']},
{$CA['PV']},
{$CA['UPV']},
{$CA['RVS']},
{$CA['UV']},
{$CA['NV']},
{$CA['RV']},
{$CA['Visits']},
{$CA['Bounces']},
{$CA['BounceRate']},
{$CA['Exits']},
{$CA['ExitRate']},
{$CA['TotalReady']},
{$CA['ReadyTimes']},
{$CA['AvgReady']},
{$CA['TotalLoad']},
{$CA['LoadTimes']},
{$CA['AvgLoad']},
{$CA['TotalOnline']},
{$CA['OnlineTimes']},
{$CA['AvgOnline']},
{$CA['TotalDelay']},
{$CA['DelayTimes']},
{$CA['AvgDelay']},
{$CA['MaxReadX']},
{$CA['MaxReadY']},
{$CA['MRTimes']},
{$CA['AvgMRX']},
{$CA['AvgMRY']},
{$CA['DREntry']},
{$CA['SEEntry']},
{$CA['RFEntry']},
'{$CA['Detail']}',
{$CA['Clicks']},
{$CA['ValidClicks']},
'{$CA['Extra']}',
'{$CA['ExtraMD5']}'
)";
}
function get_vc_insert_value(&$CA) {
return "(
{$CA['VID']},
{$CA['RecordNo']},
{$CA['DeviceType']},
{$CA['FromType']},
'{$CA['FromKey']}',
'{$CA['FromKeyMD5']}',
'{$CA['FromVal']}',
'{$CA['FromValMD5']}',
'{$CA['UTMSource']}',
'{$CA['UTMMedium']}',
'{$CA['UTMTerm']}',
'{$CA['UTMContent']}',
'{$CA['UTMCampaign']}',
{$CA['TotalPageViews']},
{$CA['UCR']},
{$CA['MX']},
{$CA['MY']},
{$CA['X']},
{$CA['Y']},
{$CA['ClientWidth']},
{$CA['ClientHeight']},
{$CA['ClientLeft']},
{$CA['ClientTop']},
'{$CA['Page']}',
'{$CA['PageMD5']}',
{$CA['NodeActionType']},
'{$CA['NodeIDMD5']}',
'{$CA['NodeHtmlMD5']}',
'{$CA['NodeTagMD5']}',
'{$CA['NodeNodeMD5']}',
'{$CA['NodeHref']}',
'{$CA['NodeHrefMD5']}',
'{$CA['NodeText']}',
'{$CA['NodeRepeatClick']}',
{$CA['RecordTime']}
)";
}
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。