Author

Topic: [SOLVED].001 btc bounty for whoever helps with this php issue (using R (Read 616 times)

full member
Activity: 182
Merit: 100
nevermind, SOLVED.

Anyone having this issue:

make sure that when you _get the amount data from the HTML form, you do something like this:

Code:
$w_amount= (int)@$_GET["amount"];

before, I didnt have (int) there, and it was failing because it thought it was a string, rather than a number
full member
Activity: 182
Merit: 100
Having an issue making a transaction through php with the JSON api.

Heres the code:

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:

Quote
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
Jump to: