Bitcoin Forum
June 17, 2024, 07:59:40 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: help PHP - sendmany blockchain.info  (Read 448 times)
evilimprint (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
March 19, 2014, 06:00:29 PM
Last edit: March 19, 2014, 09:15:28 PM by evilimprint
 #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);
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!