diff --git a/BDKp_library.php b/BDKp_library.php index 8935541..ec0f517 100644 --- a/BDKp_library.php +++ b/BDKp_library.php @@ -25,11 +25,14 @@ ================================================= Begin loading necessary dependencies to run this script (Probubly don't need to touch this, just make sure you know what your doing) */ + //Working directory + $dir_filename = dirname(__FILE__); + //Include configuration file required to connect to Bitcoind - include("config.php"); + include($dir_filename."/config.php"); //Include the JSON-RPC PHP script (Used for querying Bitcoind) - include("dependencies/jsonRPCClient.php"); + include($dir_filename."/dependencies/jsonRPCClient.php"); @@ -65,6 +68,8 @@ function bitcoin_open_connection(){ /* Return status codes -1 = Failure to open connection 1 = Success + + 101 = BTC connection not properly configured. */ //Make sure we have all nessecary information to make a connection if($btcclient["host"] != '' && $btcclient["user"] != '' && $btcclient["pass"] != '' && $btcclient["https"] != '' && $btcclient["port"] > 0){ @@ -80,6 +85,8 @@ function bitcoin_open_connection(){ //Return success code $output["return_status"] = 1; } + }else{ + $output["return_status"] = 101; } @@ -1431,4 +1438,4 @@ function bdk_prove_coin_ownership($bitcoin_address='', $step=1, $step_2_signatur $bdk_integrity_check = '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'; /********************* END CLEAR CHECKSUM MEMORY *************/ -?> \ No newline at end of file +?>