mirror of https://github.com/IoTcat/Ushio-js.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
801 B
34 lines
801 B
|
|
var __isCookie = 0; |
|
|
|
function heartbeat_get() |
|
{ |
|
cookie.set("fp",fp); |
|
cookie.set("fp_",fp); |
|
$.post("https://log.yimian.xyz/heartbeat_get.php",{"ip":ip,"fp":fp,"city":ipCity},function(msg){ |
|
|
|
var obj = eval('(' + msg + ')'); |
|
var t = Date.parse(new Date())/1000; |
|
|
|
if(t > obj.t && t < obj.t + 30) __isCookie = 1; |
|
|
|
if(cookie.get("_t") == obj.tt) return; |
|
|
|
var aCookie = obj.cookie.split("; "); |
|
var _obj = new Object(); |
|
for(var i = 0; i < aCookie.length; i++){ |
|
|
|
var aCrumb = aCookie[i].split("="); |
|
_obj[aCrumb[0]] = aCrumb[1]; |
|
} |
|
|
|
var arr=Object.keys(_obj); |
|
|
|
for(var i = 0; i < arr.length; i++){ |
|
|
|
cookie.set(arr[i], _obj[arr[i]]); |
|
} |
|
}); |
|
}; |
|
heartbeat_get(); |
|
|
|
|