-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGets.php
More file actions
37 lines (32 loc) · 865 Bytes
/
Gets.php
File metadata and controls
37 lines (32 loc) · 865 Bytes
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
36
37
<?php
class Gets
{
static function getToken()
{
$header = getallheaders();
$token = $header['token'];
return $token;
}
static function getUserAgent()
{
$header = getallheaders();
$user_agent = $header['User-Agent'];
return $user_agent;
}
static function InfoClient()
{
$header = getallheaders();
$info = $header['Info-Client'];
return $info;
}
static function checkToken()
{
$db = new DBconnect();
$token = Self::getToken();
$query = mysqli_query($db ->connect(), "SELECT * FROM `token` INNER JOIN `users` ON token.uid = users.id WHERE `token` = '$token'");
if(mysqli_num_rows($query) == 1){
return mysqli_fetch_assoc($query);
}else{
}
}
}