mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-04-12 08:59:02 +02:00
update
This commit is contained in:
parent
682a4517fa
commit
56089892d0
@ -5,11 +5,20 @@
|
||||
$redis = new Redis();
|
||||
$redis->pconnect(_REDIS_SERVER);
|
||||
|
||||
ga_page_view($redis);
|
||||
if(!isset($_SERVER['HTTP_RANGE'])) {
|
||||
matomo_page_view($redis);
|
||||
}
|
||||
|
||||
$hash = substr($_SERVER["REQUEST_URI"], 1);
|
||||
$hashKey = _UIP . ':' . $hash;
|
||||
|
||||
$redis->publish('dl-track', json_encode(array(
|
||||
"uid" => $_COOKIE["VC:UID"],
|
||||
"uip" => _UIP,
|
||||
"hash" => $hash,
|
||||
"range" => $_SERVER['HTTP_RANGE']
|
||||
)));
|
||||
|
||||
if(_IS_LB_HOST == False && count(_LB_HOSTS) > 0) {
|
||||
$has_cache = $redis->sIsMember("VC:DL:LB", $hash);
|
||||
if($has_cache == False) {
|
||||
@ -24,11 +33,11 @@
|
||||
|
||||
if($lb_hash_cache == True){
|
||||
$redis->sadd("VC:DL:LB", $hash);
|
||||
header("location: https://" . _LB_HOSTNAME . "/" . $hash);
|
||||
header("location: https://" . _LB_HOSTNAME . "/" . $hash, true, 301);
|
||||
exit();
|
||||
}
|
||||
} else {
|
||||
header("location: https://" . _LB_HOSTNAME . "/" . $hash);
|
||||
header("location: https://" . _LB_HOSTNAME . "/" . $hash, true, 301);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
@ -224,7 +224,7 @@
|
||||
"rec" => 1,
|
||||
"apiv" => 1,
|
||||
"_id" => isset($_COOKIE["VC:UID"]) ? $_COOKIE["VC:UID"] : uniqid(),
|
||||
"url" => "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]",
|
||||
"url" => (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]",
|
||||
"cip" => _UIP,
|
||||
"ua" => isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : "",
|
||||
"urlref" => isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user