· 6 years ago · Mar 20, 2019, 12:26 PM
1<?php
2require "vendor/autoload.php";
3use \Firebase\JWT\JWT;
4
5ob_start();
6
7
8$secretkey = "114c23s" . $_GET['ip'] . "122823sdfa";
9$secretkey = str_pad($secretkey, 32, "a");
10
11$payload = array(
12 "edition" => "business",
13 "ip" => $_GET['ip'],
14 "hash_expired" => time() +50000,
15 "license_expired" => time() + (60 * 24 * 60 * 60),
16 "key" => $_GET['key']
17 );
18
19 $jwt = JWT::encode($payload, $secretkey, 'HS512');
20 print_r($jwt);
21
22register_shutdown_function(function() {
23 header('Content-Length: ' . ob_get_length());
24 ob_end_flush();
25});
26?>