$data_string = '{
"jsonrpc": "1.0",
"method": "getinfo",
"id": "curltext",
"params": {
}
}';
$ch = curl_init('
http://username:password@MyNodeIPAddress:23741');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
);
$result = curl_exec($ch);
echo $result;
I try to above PHP code, use RPC to call the node IP and getinfo from the NODE of the altcoin, no response, what is the problem?