-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtokens.php
More file actions
executable file
·19 lines (16 loc) · 817 Bytes
/
tokens.php
File metadata and controls
executable file
·19 lines (16 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
try {
$soluce = new \PDO('mysql:host=localhost;dbname=soluces', 'root', 'toto');
$soluce->query('INSERT INTO tokens (user_id, user_name, token, `datetime`)
VALUES(' . $user->Id . ',
' . $soluce->quote($user->UserName) . ',
' . $soluce->quote($token['oauth_token']) . ',
NOW())
ON DUPLICATE KEY UPDATE user_name = ' . $soluce->quote($user->UserName) . ',
token = ' . $soluce->quote($token['oauth_token']) . ',
invalid = 0,
datetime = NOW();');
} catch (Exception $e) {
die($e->getMessage());
}
//include dirname(dirname(dirname(__DIR__))) . '/tokens.php';