-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.php
55 lines (46 loc) · 1.79 KB
/
test.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
// hash sha1 session
// $plain = 's2';
// $hash_password = sha1($plain);
// $simple_hash = '$2y$10$dgtzFcVTBa9HCLurf05e9ODtUZ8tSsGkX2XR1BLeM74k.CfgWWNQ2';
// $result = password_verify($plain, $hash_password);
// $hash_password = password_hash($plain, PASSWORD_BCRYPT);
// $result = password_verify($plain, $hash_password);
// echo "username: $plain <br/>";
// echo "password: $hash_password <br/>";
// echo sha1($plain)."<br/>";
// echo "{sha1($plain)} === {$hash_password}";
// echo "s1: ".sha1('s1')."<br/>";
// echo "s2: ".sha1('s2')."<br/>";
// echo "s3: ".sha1('s3');
// $_GET
// echo "<pre>";
// // var_dump(array_keys($_GET));
// echo json_encode($_POST, JSON_UNESCAPED_UNICODE);
// echo "</pre>";
// $purchase_id = $_POST['purchase_id'];
// $set_pending_status_sql = "
// UPDATE purchase
// SET PURCHASE_STATUS = 'P'
// WHERE PURCHASE_ID = '$purchase_id';
// ";
// echo $set_pending_status_sql;
// define('STATUS_URI', 'https://notify-api.line.me/api/status');
// $headers = [
// "Authorization: Bearer sMpjyLrk6WrFjgO0bboXxuZExejzYnsJG7oIyvZnUA3"
// ];
// $ch = curl_init();
// curl_setopt($ch, CURLOPT_URL, STATUS_URI);
// curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// // curl_setopt($ch, CURLOPT_HEADER, 0);
// $res = curl_exec($ch);
// curl_close($ch);
// if ($res == false)
// throw new Exception(curl_error($ch), curl_errno($ch));
// $json = json_decode($res);
// $status = $json->status;
// var_dump($res);
echo $_SERVER['QUERY_STRING']."<br/>";
echo base64_encode($_SERVER['QUERY_STRING']);