forked from jlubbers08/IPFS-Bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ipfs-Verification.php
51 lines (39 loc) · 1.05 KB
/
ipfs-Verification.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
<?php
global $wopdb;
function randomstring($len)
{
$string = "";
$chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for($i=0;$i<$len;$i++)
$string.=substr($chars,rand(0,strlen($chars)),1);
return $string;
}
$requestType = $_SERVER['REQUEST_METHOD'];
if($requestType == "POST"){
$string = randomstring(50);
$string = "RHU0g3ux4pjicDG6LMhtUCiM53IopRw9HR1GAoAqNiHQoDc0";
$requestType = $_SERVER['REQUEST_METHOD'];
$jsondata = $entityBody = file_get_contents('php://input');
//logEvent($jsondata);
$params = json_decode($jsondata, true);
$code = $params['valid'];
$response = $arr = array();
$response = $params;
update_option('ipfs_trial', $code);
}
//function ActivateTrial(){
//
//
//
// $jsondata = $entityBody = file_get_contents('php://input');
// //logEvent($jsondata);
// $params = json_decode($jsondata, true);
//
//
// $code = $params['valid'];
// $response = $arr = array();
// $response = $params;
//
// update_option('ipfs_trial', $code);
//
//}