Commit db67fa87 authored by tonyford's avatar tonyford
Browse files

env check

parent e38bf617
Pipeline #11515 passed with stage
in 6 seconds
......@@ -4,6 +4,24 @@ if( empty($_GET['addr'] ) ) exit;
$address=$_GET['addr'];
define('ELECTRUMFAIR_USER',getenv('erpcuser'));
define('ELECTRUMFAIR_PASS',getenv('erpcpassword'));
define('ELECTRUMFAIR_PORT',getenv('erpcport'));
define('ELECTRUMFAIR_RPC','http://'+ELECTRUMFAIR_USER+':'+ELECTRUMFAIR_PASS+'@127.0.0.1:'+ELECTRUMFAIR_PORT);
define('FAIRCOIND_USER',getenv('rpcuser'));
define('FAIRCOIND_PASS',getenv('rpcpassword'));
define('FAIRCOIND_PORT',getenv('rpcport'));
define('FAIRCOIND_RPC', 'http://'+FAIRCOIND_USER+':'+FAIRCOIND_PASS+'@127.0.0.1:'+FAIRCOIND_PORT);
if( empty(ELECTRUMFAIR_USER) ||
empty(ELECTRUMFAIR_PASS) ||
empty(ELECTRUMFAIR_PORT) ||
empty(FAIRCOIND_USER) ||
empty(FAIRCOIND_PASS) ||
empty(FAIRCOIND_PORT) || ) exit;
/**
*
*/
......@@ -121,17 +139,6 @@ class FaircoinAddress
}
define('ELECTRUMFAIR_USER',getenv('erpcuser'));
define('ELECTRUMFAIR_PASS',getenv('erpcpassword'));
define('ELECTRUMFAIR_PORT',getenv('erpcport'));
define('ELECTRUMFAIR_RPC','http://'+ELECTRUMFAIR_USER+':'+ELECTRUMFAIR_PASS+'@127.0.0.1:'+ELECTRUMFAIR_PORT);
define('FAIRCOIND_USER',getenv('rpcuser'));
define('FAIRCOIND_PASS',getenv('rpcpassword'));
define('FAIRCOIND_PORT',getenv('rpcport'));
define('FAIRCOIND_RPC', 'http://'+FAIRCOIND_USER+':'+FAIRCOIND_PASS+'@127.0.0.1:'+FAIRCOIND_PORT);
$F=new FairCoinAddress($address);
$F->getaddresshistory();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment