Author

Topic: help PHP - sendmany blockchain.info (Read 471 times)

newbie
Activity: 24
Merit: 0
March 19, 2014, 01:00:29 PM
#1
I am trying to write a script to send many but i keep getting a error return of

"Invalid Recipients JSON. Please make sure it is url encoded and consult the docs."


Code:
this is where i encode the array which KEY = BTCAddress, Value = BTCAmount
$json_encode = json_encode($this->PayoutJSON);

this is where i url encode the json encoded array
$recipients = urlencode($json_encode);

then this is how i send.
$json_url = "https://blockchain.info/merchant/$GUID/sendmany?password=$FPASSWORD&second_password=$SPASSWORD&recipients=$recipients";
$json_data = file_get_contents($json_url);
$json_feed = json_decode($json_data);
Jump to: