-
Notifications
You must be signed in to change notification settings - Fork 21
/
common.php.sample
44 lines (35 loc) · 1.8 KB
/
common.php.sample
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
<?php
use BitWasp\Bitcoin\Network\NetworkFactory;
define("BTCSCHOOLS_ROOT", "/home/btcschools/public_html");
define("BTCSCHOOLS_URL", "https://www.btcschools.net");
date_default_timezone_set('UTC');
session_start();
$_BITCOINCLI_CONFIG = ['bitcoincli_rpc_user' => "someRPCuser", 'bitcoincli_rpc_pwd' => "someRPCpassword", 'bitcoincli_rpc_host' => "127.0.0.1"];
$_ELECTRUM_CONFIG = ['electrum_rpc_user' => "someRPCuser",'electrum_rpc_pwd' => "someRPCpassword", 'electrum_rpc_host' => "127.0.0.1"];
function safeBitcoincliSource($source) {
return str_replace(
['$bitcoincli_rpc_user = "someRPCuser"', '$bitcoincli_rpc_pwd = "someRPCpassword"', '$bitcoincli_rpc_host = "127.0.0.1"'],
['$bitcoincli_rpc_user = "someRPCuser"','$bitcoincli_rpc_pwd = "someRPCpassword"','$bitcoincli_rpc_host = "127.0.0.1"'],
$source
);
}
function safeElectrumSource($source) {
return str_replace(
['$electrum_rpc_user = "someRPCuser"', '$electrum_rpc_pwd = "someRPCpassword"', '$electrum_rpc_host = "127.0.0.1"'],
['$electrum_rpc_user = "someRPCuser"','$electrum_rpc_pwd = "someRPCpassword"','$electrum_rpc_host = "127.0.0.1"'],
$source
);
}
function debug($var) {
echo "<Pre>";
print_r($var);
echo "</Pre>";
}
$settings = [];
$settings['btc_address_qrcode'] = BTCSCHOOLS_URL . "/media/images/payments/bitcoin.jpg";
$settings['btc_address'] = "bc1qahfakg7uk77xnan2ex8a55fd3ml30n65f7vw92";
$settings['lite_address_qrcode'] = BTCSCHOOLS_URL . "/media/images/payments/litecoin.jpg";
$settings['lite_address'] = "ltc1qj32hh6ht2n6knswnnk5ar4jc9f59xkqe2npsqu";
$settings['eth_address_qrcode'] = BTCSCHOOLS_URL . "/media/images/payments/ethereum.jpg";
$settings['eth_address'] = "0x114f0669d8dB5641bAfEcD1D2340c47A88d0E3f4";
header('Content-Type: text/html; charset=utf-8');