Having an issue making a transaction through php with the JSON api.
Heres the code:
else if (@$coin_type == 'btc') {
echo $coin_type;
if ($btcbalance < $w_amount+$tx_fee) {
echo "
You can't withdraw more than you have available. It maybe the .001 transaction fee, please check your math.
";
}
else {
$btc->sendfrom($username,$send_to,$w_amount);
}
}Note: $btc->sendfrom($username,$send_to,$w_amount); is the line giving me the error. The error comes as follows:
coinye Warning: fopen(http://
[email protected]:41337/): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in C:\inetpub\wwwroot\includethis.php on line 132 Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to
http://xxxx:[email protected]:41337/' in C:\inetpub\wwwroot\includethis.php:140 Stack trace: #0 C:\inetpub\wwwroot\withdrawal.php(52): jsonRPCClient->__call('sendfrom', Array) #1 C:\inetpub\wwwroot\withdrawal.php(52): jsonRPCClient->sendfrom('lmfsthefounder', '5baud3bQkE3Dpkv...', '1') #2 {main} thrown in C:\inetpub\wwwroot\includethis.php on line 140
The documentation states the syntax as :
sendfrom:
[minconf=1] [comment] [comment-to]
so I used a plaintext account name, the to address and the amount, which I get from forms with _get