-
Notifications
You must be signed in to change notification settings - Fork 8
/
dream.php
259 lines (149 loc) · 6.7 KB
/
dream.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Bludit">
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Dynamic title tag -->
<title>KEVA.APP | GALAXY</title>
<!-- Dynamic description tag -->
<meta name="description" content="">
<!-- Include Favicon -->
<link rel="icon" href="https://keva.app/bludit/bl-themes/koh/img/favicon.png" type="image/png">
<!-- Include CSS Bootstrap file from Bludit Core -->
<link rel="stylesheet" type="text/css" href="https://keva.app/bludit/bl-kernel/css/bootstrap.min.css?version=3.12.0">
<!-- Include CSS Styles from this theme -->
<link rel="stylesheet" type="text/css" href="https://keva.app/bludit/bl-themes/koh/css/style.css?version=3.12.0">
<body style="color:#ccc;">
<?php
$kpc = new Keva();
$_REQ = array_merge($_GET, $_POST);
//creat new to blockchain
if($_REQ["chiaid"]<>"" & $_REQ["chianame"]<>"")
{
sleep(1);
$getid=trim(strip_tags($_REQ["chiaid"]));
$getname=trim(strip_tags($_REQ["chianame"]));
$getname=strtoupper($getname);
if(strlen($getid)==64){
$checknp=$kpc->keva_get("NYL2Y1a1ZhrxSTXWdiKLoYujNX615Xo8ZB",$getid);
if(!$checknp['height']){
$chiakeva=$kpc->keva_put("NYL2Y1a1ZhrxSTXWdiKLoYujNX615Xo8ZB",$getid,$getname);
echo "<br><center><font size=4>".$getname."<br><br>".$getid." is on the blockchain now</font></center>";
}
else{
echo "<br><center><font size=4>".$getname."<br><br>".$getid." is already on the blockchain</font></center>";
}
}
else
{echo"<script>alert('No CHIA ID');</script>";
$url="dream.php";
echo "<script>window.location.href=decodeURIComponent('".$url."')</script>";
exit;
}
}
echo "<br><form action=\"\" method=\"post\" >";
echo "<center><input type=\"text\" name=\"chiaid\" id=\"editor\" class=\"textarea-inherit\" style=\"width:300px;border: 1px solid #59fbea;font-family: coda_regular, arial, helvetica, sans-serif;-webkit-appearance: none;-webkit-border-radius:0;height:36px;font-size: 30px; background-color: rgb(11, 12, 13);color: #ddd;padding-left:10px;
\" value=\"\" maxlength=64 placeholder=\"CHIA ASSET ID\"><br><br>";
echo "<input type=\"text\" name=\"chianame\" id=\"editor\" class=\"textarea-inherit\" style=\"width:300px;border: 1px solid #59fbea;font-family: coda_regular, arial, helvetica, sans-serif;-webkit-appearance: none;-webkit-border-radius:0;height:36px;font-size: 30px; background-color: rgb(11, 12, 13);color: #ddd;padding-left:10px;
\" value=\"\" maxlength=10 placeholder=\"CHIA ASSET NAME\"></center><br>";
echo "<center><input type=\"submit\" value=\"SUBMIT\" style=\"border: 1px solid #59fbea;-webkit-appearance:none ;-webkit-border-radius: 0;border-radius:0;height:36px;background-color: rgb(0, 79, 74);color: #59fbea;margin-left:20px;width:180px;font-size: 20px;padding-top:0px;\"></center></li></ul></div>";
echo "</form>";
//menu
echo "<br><br>";
echo "This is a free CHIA ASSET NAME service for everyone to add ID and NAME. You can add CATs ID and NAME to kevacoin blockchain. This speace number is 64731017<br><br>";
echo "It is better to use <a href=https://kevacoin.org/>kevacoin app</a> to add more CATs data like this <a href=https://keva.one/32103>keva.one/32103</a> You can use #chia #cats or other tages for searching in the app or <a href=https://keva.one/search>keva.one/search</a><br>";
echo "<br><br><a href=https://CHIA.KEVA.APP>CHIA.KEVA.APP</a>";
class Keva {
private $proto;
private $url;
private $CACertificate;
public $status;
public $error;
public $raw_response;
public $response;
private $id = 0;
public function __construct($url = null) {
$this->username = 'galaxy'; // RPC Username
$this->password = 'frontier'; // RPC Password
$this->host = '127.0.0.1'; // Localhost
$this->port = '9992';
$this->url = $url;
$this->proto = 'http';
$this->CACertificate = null;
}
public function setSSL($certificate = null) {
$this->proto = 'https';
$this->CACertificate = $certificate;
}
public function __call($method, $params) {
$this->status = null;
$this->error = null;
$this->raw_response = null;
$this->response = null;
$params = array_values($params);
$this->id++;
$request = json_encode(array(
'method' => $method,
'params' => $params,
'id' => $this->id
));
$curl = curl_init("{$this->proto}://{$this->host}:{$this->port}/{$this->url}");
$options = array(
CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
CURLOPT_USERPWD => $this->username . ':' . $this->password,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_MAXREDIRS => 10,
CURLOPT_HTTPHEADER => array('Content-type: text/plain'),
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $request
);
if (ini_get('open_basedir')) {
unset($options[CURLOPT_FOLLOWLOCATION]);
}
if ($this->proto == 'https') {
if (!empty($this->CACertificate)) {
$options[CURLOPT_CAINFO] = $this->CACertificate;
$options[CURLOPT_CAPATH] = DIRNAME($this->CACertificate);
} else {
$options[CURLOPT_SSL_VERIFYPEER] = false;
}
}
curl_setopt_array($curl, $options);
$this->raw_response = curl_exec($curl);
$this->response = json_decode($this->raw_response, true);
$this->status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
$curl_error = curl_error($curl);
curl_close($curl);
if (!empty($curl_error)) {
$this->error = $curl_error;
}
if ($this->response['error']) {
$this->error = $this->response['error']['message'];
} elseif ($this->status != 200) {
switch ($this->status) {
case 400:
$this->error = 'HTTP_BAD_REQUEST';
break;
case 401:
$this->error = 'HTTP_UNAUTHORIZED';
break;
case 403:
$this->error = 'HTTP_FORBIDDEN';
break;
case 404:
$this->error = 'HTTP_NOT_FOUND';
break;
}
}
if ($this->error) {
return false;
}
return $this->response['result'];
}
}
?>
<br>
</body>