-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
93 lines (93 loc) · 2.44 KB
/
index.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
<?php
include('PHPCoinAddress.php');
include('EtherHome.php');
$msg="";
?>
<!DOCTYPE html>
<html>
<head>
<title>CryptoWallet Generator PHP</title>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="bootstrap.css">
</head>
<body>
<?php
if(isset($_POST['generate'])){
$cointype=$_POST['cointype'];
if(empty($cointype)){
$meg="<b>Invalid Coin Type";
}else{
if($cointype=='ETH'){
$coin=ETHWALLET();
$public=$coin[0];
$private=$coin[1];
$msg="Ethereum Wallet <br/>";
$msg.="Public Address => ".$public." <br/>";
$msg.="Private Key => ".$private." <br/>";
}else{
$coin=CoinAddress::$cointype();
$public=$coin['public'];
$private=$coin['private'];
$msg=$cointype." Wallet <br/>";
$msg.="Public Address => ".$public." <br/>";
$msg.="Private Key => ".$private." <br/>";
}
}
}
if(isset($_POST['generate2'])){
$cointype=$_POST['cointype'];
if(empty($cointype)){
$meg="<b>Invalid Coin Type";
}else{
header("location:api.php?id=".$cointype);
}
}
?>
<div class="row">
<h1 align="center"><b>CryptoWallet Generator API PHP</b></h1>
</div>
<div class="row" style="margin:30px;">
<div class="col-lg-4">
<p align="justify">
This a server side wallet service written in php that does not save private keys on <b>any</b> database. Written in pure PHP without any framework, the private keys can be fetch directly on this page or fetch through an external url using JSON Array.
<code>
@kaakadev
</code>
</p>
</div>
<div class="col-lg-2">
<form method="post">
<h2>Generator</h2>
<div class="form-group">
<label>Coin Type</label>
<select class="form-control" name="cointype">
<option></option>
<option value="BTC">Bitcoin</option>
<option value="ETH">Ethereum</option>
<option value="LTC">Litecoin</option>
<option value="DODGE">Dodge Coin</option>
<option value="DASH">Dash Coin</option>
<option value="FETHER">FETHERCOIN</option>
</select>
</div>
<div class="form-group">
<button class="btn btn-success" name="generate"> Generate</button>
</div>
<div class="form-group">
<h2>Or generate JSON Array</h2>
<button class="btn btn-success" name="generate2"> Fetch JSON</button>
</div>
</form>
</div>
<div class="col-lg-6">
<h2>Output</h2>
<code>
<h4>Output Goes Here</h4>
<?php
print_r($msg);
?>
</code>
</div>
</div>
</body>
</html>