$cmd, 'params' => $params, 'id' => '1' )); // Prepare and performs the HTTP POST $opts = array ('http' => array ( 'method' => 'POST', 'header' => 'Content-type: application/json', 'content' => $request )); $fp = fopen($emcCONNECT, 'rb', false, stream_context_create($opts)); if(!$fp) throw new Exception('emcssl_NVS_req: Unable to connect to EMC-wallet'); $rc = json_decode(stream_get_contents($fp), true); $er = $rc['error']; if(!is_null($er)) throw new Exception('emcssl_NVS_req: Response error: ' . $er); return $rc['result']; } // emcssl_NVS //-------------------------------------------- for($i = 0; $i < 10; $i++) { $ret = Req('getnewaddress', array("TestAddr")); echo "\n-------- $i --------\n"; print_r($ret); } ?>