复制代码 代码如下:
/**
* vlstat 浏览器统计脚本
*/
var statIdName = "vlstatId";
var xmlHttp;
/**
* 设置cookieId
*/
function setCookie(c_name, value, expiredays) {
var exdate = new Date();
exdate.setDate(exdate.getDate() + expiredays);
document.cookie = c_name + "=" + escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString()) + ";path=/;domain=cecb2b.com";
}
/**
* 获取cookieId
*/
function getCookie(c_name) {
if (document.cookie.length > 0) {
c_start = document.cookie.indexOf(c_name + "=");
if (c_start != -1) {
c_start = c_start + c_name.length + 1;
c_end = document.cookie.indexOf(";", c_start);
if (c_end == -1) {
c_end = document.cookie.length;
}
return unescape(document.cookie.substring(c_start, c_end));
}
}
return "";
}
/**
* 获取当前时间戳
*/
function getTimestamp() {
var timestamp = Date.parse(new Date());
return timestamp;
}
/**
* 生成statId
*/
function genStatId() {
var cookieId = getTimestamp();
cookieId = "vlstat" + "-" + cookieId + "-" + Math.round(Math.random() * 3000000000);
return cookieId;
}
/**
* 设置StatId
*/
function setStatId() {
var cookieId = genStatId();
setCookie(statIdName, cookieId, 365);
}
/**
* 获取StatId
*/
function getStatId() {
var statId = getCookie(statIdName);
if (statId != null && statId.length > 0) {
return statId;
} else {
setStatId();
return getStatId();
}
}
/**
* 获取UA
*/
function getUA() {
var ua = navigator.userAgent;
if (ua.length > 250) {
ua = ua.substring(0, 250);
}
return ua;
}
/**
* 获取浏览器类型
*/
function getBrower() {
var ua = getUA();
if (ua.indexOf("Maxthon") != -1) {
return "Maxthon";
} else if (ua.indexOf("MSIE") != -1) {
return "MSIE";
} else if (ua.indexOf("Firefox") != -1) {
return "Firefox";
} else if (ua.indexOf("Chrome") != -1) {
return "Chrome";
} else if (ua.indexOf("Opera") != -1) {
return "Opera";
} else if (ua.indexOf("Safari") != -1) {
return "Safari";
} else {
return "ot";
}
}
/**
* 获取浏览器语言
*/
function getBrowerLanguage() {
var lang = navigator.browserLanguage;
return lang != null && lang.length > 0 ? lang : "";
}
/**
* 获取操作系统
*/
function getPlatform() {
return navigator.platform;
}
/**
* 获取页面title
*/
function getPageTitle() {
return document.title;
}
/**
* 创建一个form
*
* @return
*/
function createSubmitForm() {
var frm = document.createElement("form");
document.body.appendChild(frm);
frm.method = "POST";
return frm;
}
/**
* 为form创建一个元素
*
* @param inputForm
* @param elementName
* @param elementValue
* @return
*/
function createFormElement(frmInput, elementName, elementValue) {
var element = document.createElement("input");
element.setAttribute("id", elementName);
element.setAttribute("name", elementName);
element.setAttribute("type", "hidden");
element.setAttribute("value", elementValue);
frmInput.appendChild(element);
return element;
}
/**
* 构造XMLHttpRequest对象
*
* @return
*/
function createXMLHttpRequest() {
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject('Microsoft.XMLHTTP');
} else if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
}
}
/**
* url指定跳转页,data是要post的数据。func类似于函数指针
*
* @param url
* @param data
* @param func
* @return
*/
function AjaxPost(url, data, func) {
var httpRequest = createHttpRequest();
if (httpRequest) {
httpRequest.open("POST", url, true);
httpRequest.setRequestHeader("content-length", data.length);
httpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpRequest.send(data);
httpRequest.onreadystatechange = function() {
if (httpRequest.readyState == 4) {
try {
if (httpRequest.status == 200) {
if (func) {
// 这里可以调用想要的函数
func(httpRequest.responseText);
}
}
} catch (e) {
alert("Error XMLHttpRequest!");
}
}
}
} else {
alert("Error initializing XMLHttpRequest!");
}
}
function vlstatInitLE(vlch, vlch1, vlch2, vlch3) {
var p;
var vlstatCH = vlch != null && vlch.length > 0 ? vlch : "";
var vlstatCH1 = vlch1 != null && vlch1.length > 0 ? vlch1 : "";
var vlstatCH2 = vlch2 != null && vlch2.length > 0 ? vlch2 : "";
var vlstatCH3 = vlch3 != null && vlch3.length > 0 ? vlch3 : "";
var vlstatCookieId = getStatId();
var vlstatUA = encodeURIComponent(getUA());
var vlstatIPAddress = document.localName;
var vlstatREFURL = encodeURIComponent(document.referrer);
var vlstatURL = encodeURIComponent(document.URL);
var vlstatScreenX = screen.width;
var vlstatScreenY = screen.height;
var vlstatOS = getPlatform();
var vlstatBrower = getBrower();
var vlstatBrowerLanguage = getBrowerLanguage();
var vlstatPageTitle = encodeURIComponent(getPageTitle());
var vlstatAction = "index.php";
p = "cookieId=" + vlstatCookieId + "&ua=" + vlstatUA + "&ip=" + vlstatIPAddress + "&refurl="
+ vlstatREFURL + "&url=" + vlstatURL + "&screenX=" + vlstatScreenX + "&screenY=" + vlstatScreenY
+ "&os=" + vlstatOS + "&brower=" + vlstatBrower + "&browerLang=" + vlstatBrowerLanguage
+ "&title=" + vlstatPageTitle + "&ch=" + vlstatCH + "&ch1=" + vlstatCH1 + "&ch2=" + vlstatCH2
+ "&ch3=" + vlstatCH3;
var urlGo = vlstatAction + "?" + p;
createXMLHttpRequest();
xmlHttp.open('GET', urlGo);
xmlHttp.send(null);
}
/**
* vlstat 浏览器统计脚本
*/
var statIdName = "vlstatId";
var xmlHttp;
/**
* 设置cookieId
*/
function setCookie(c_name, value, expiredays) {
var exdate = new Date();
exdate.setDate(exdate.getDate() + expiredays);
document.cookie = c_name + "=" + escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString()) + ";path=/;domain=cecb2b.com";
}
/**
* 获取cookieId
*/
function getCookie(c_name) {
if (document.cookie.length > 0) {
c_start = document.cookie.indexOf(c_name + "=");
if (c_start != -1) {
c_start = c_start + c_name.length + 1;
c_end = document.cookie.indexOf(";", c_start);
if (c_end == -1) {
c_end = document.cookie.length;
}
return unescape(document.cookie.substring(c_start, c_end));
}
}
return "";
}
/**
* 获取当前时间戳
*/
function getTimestamp() {
var timestamp = Date.parse(new Date());
return timestamp;
}
/**
* 生成statId
*/
function genStatId() {
var cookieId = getTimestamp();
cookieId = "vlstat" + "-" + cookieId + "-" + Math.round(Math.random() * 3000000000);
return cookieId;
}
/**
* 设置StatId
*/
function setStatId() {
var cookieId = genStatId();
setCookie(statIdName, cookieId, 365);
}
/**
* 获取StatId
*/
function getStatId() {
var statId = getCookie(statIdName);
if (statId != null && statId.length > 0) {
return statId;
} else {
setStatId();
return getStatId();
}
}
/**
* 获取UA
*/
function getUA() {
var ua = navigator.userAgent;
if (ua.length > 250) {
ua = ua.substring(0, 250);
}
return ua;
}
/**
* 获取浏览器类型
*/
function getBrower() {
var ua = getUA();
if (ua.indexOf("Maxthon") != -1) {
return "Maxthon";
} else if (ua.indexOf("MSIE") != -1) {
return "MSIE";
} else if (ua.indexOf("Firefox") != -1) {
return "Firefox";
} else if (ua.indexOf("Chrome") != -1) {
return "Chrome";
} else if (ua.indexOf("Opera") != -1) {
return "Opera";
} else if (ua.indexOf("Safari") != -1) {
return "Safari";
} else {
return "ot";
}
}
/**
* 获取浏览器语言
*/
function getBrowerLanguage() {
var lang = navigator.browserLanguage;
return lang != null && lang.length > 0 ? lang : "";
}
/**
* 获取操作系统
*/
function getPlatform() {
return navigator.platform;
}
/**
* 获取页面title
*/
function getPageTitle() {
return document.title;
}
/**
* 创建一个form
*
* @return
*/
function createSubmitForm() {
var frm = document.createElement("form");
document.body.appendChild(frm);
frm.method = "POST";
return frm;
}
/**
* 为form创建一个元素
*
* @param inputForm
* @param elementName
* @param elementValue
* @return
*/
function createFormElement(frmInput, elementName, elementValue) {
var element = document.createElement("input");
element.setAttribute("id", elementName);
element.setAttribute("name", elementName);
element.setAttribute("type", "hidden");
element.setAttribute("value", elementValue);
frmInput.appendChild(element);
return element;
}
/**
* 构造XMLHttpRequest对象
*
* @return
*/
function createXMLHttpRequest() {
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject('Microsoft.XMLHTTP');
} else if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
}
}
/**
* url指定跳转页,data是要post的数据。func类似于函数指针
*
* @param url
* @param data
* @param func
* @return
*/
function AjaxPost(url, data, func) {
var httpRequest = createHttpRequest();
if (httpRequest) {
httpRequest.open("POST", url, true);
httpRequest.setRequestHeader("content-length", data.length);
httpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpRequest.send(data);
httpRequest.onreadystatechange = function() {
if (httpRequest.readyState == 4) {
try {
if (httpRequest.status == 200) {
if (func) {
// 这里可以调用想要的函数
func(httpRequest.responseText);
}
}
} catch (e) {
alert("Error XMLHttpRequest!");
}
}
}
} else {
alert("Error initializing XMLHttpRequest!");
}
}
function vlstatInitLE(vlch, vlch1, vlch2, vlch3) {
var p;
var vlstatCH = vlch != null && vlch.length > 0 ? vlch : "";
var vlstatCH1 = vlch1 != null && vlch1.length > 0 ? vlch1 : "";
var vlstatCH2 = vlch2 != null && vlch2.length > 0 ? vlch2 : "";
var vlstatCH3 = vlch3 != null && vlch3.length > 0 ? vlch3 : "";
var vlstatCookieId = getStatId();
var vlstatUA = encodeURIComponent(getUA());
var vlstatIPAddress = document.localName;
var vlstatREFURL = encodeURIComponent(document.referrer);
var vlstatURL = encodeURIComponent(document.URL);
var vlstatScreenX = screen.width;
var vlstatScreenY = screen.height;
var vlstatOS = getPlatform();
var vlstatBrower = getBrower();
var vlstatBrowerLanguage = getBrowerLanguage();
var vlstatPageTitle = encodeURIComponent(getPageTitle());
var vlstatAction = "index.php";
p = "cookieId=" + vlstatCookieId + "&ua=" + vlstatUA + "&ip=" + vlstatIPAddress + "&refurl="
+ vlstatREFURL + "&url=" + vlstatURL + "&screenX=" + vlstatScreenX + "&screenY=" + vlstatScreenY
+ "&os=" + vlstatOS + "&brower=" + vlstatBrower + "&browerLang=" + vlstatBrowerLanguage
+ "&title=" + vlstatPageTitle + "&ch=" + vlstatCH + "&ch1=" + vlstatCH1 + "&ch2=" + vlstatCH2
+ "&ch3=" + vlstatCH3;
var urlGo = vlstatAction + "?" + p;
createXMLHttpRequest();
xmlHttp.open('GET', urlGo);
xmlHttp.send(null);
}
标签:
统计,网站,访问量
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
暂无“JS 精确统计网站访问量的实例代码”评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新动态
2024年11月09日
2024年11月09日
- 雨林唱片《赏》新曲+精选集SACD版[ISO][2.3G]
- 罗大佑与OK男女合唱团.1995-再会吧!素兰【音乐工厂】【WAV+CUE】
- 草蜢.1993-宝贝对不起(国)【宝丽金】【WAV+CUE】
- 杨培安.2009-抒·情(EP)【擎天娱乐】【WAV+CUE】
- 周慧敏《EndlessDream》[WAV+CUE]
- 彭芳《纯色角3》2007[WAV+CUE]
- 江志丰2008-今生为你[豪记][WAV+CUE]
- 罗大佑1994《恋曲2000》音乐工厂[WAV+CUE][1G]
- 群星《一首歌一个故事》赵英俊某些作品重唱企划[FLAC分轨][1G]
- 群星《网易云英文歌曲播放量TOP100》[MP3][1G]
- 方大同.2024-梦想家TheDreamer【赋音乐】【FLAC分轨】
- 李慧珍.2007-爱死了【华谊兄弟】【WAV+CUE】
- 王大文.2019-国际太空站【环球】【FLAC分轨】
- 群星《2022超好听的十倍音质网络歌曲(163)》U盘音乐[WAV分轨][1.1G]
- 童丽《啼笑姻缘》头版限量编号24K金碟[低速原抓WAV+CUE][1.1G]