-
Notifications
You must be signed in to change notification settings - Fork 477
/
index.php
35 lines (29 loc) · 907 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
error_reporting(0);
$fid = 1337;
function get($name) {
if (isset($_COOKIE[$name])) {
return $_COOKIE[$name];
}
return false;
}
function set($name, $value = null) {
if (empty($name)) return false;
setcookie($name, $value);
return true;
}
function getVisitor() {
$sign = get('visitor');
if (empty($sign)) return false;
$sign = base64_decode($sign);
return $sign;
}
function signVisitor($extension = array()) {
$sign = base64_encode(serialize($extension));
set('visitor', $sign);
}
$vistor = getVisitor();
if (!$vistor) highlight_file(__FILE__) && die();
$ext = unserialize($vistor);
if (isset($ext['currentFid']) && $ext['currentFid'] == $fid) die('GG');
signVisitor(array('currentFid'=>$fid, 'beforeFid'=>$ext['currentFid']));