Post
Topic
Board Web Wallets
Re: Blockchain api key
by
freeman1177
on 28/06/2018, 16:54:09 UTC
I'm getting NULL when running the code:

https://blockchain.info/merchant/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/sendmany?password=xxxxxx&second_password=xxxxxx&recipients=%7B%0D%0A++++++++++++++++++%221NfGMB5DNVitjvUKk2UJw2iZH28sAGP6XX%22%3A+600%0D%0A+++++++++++++++%7D

NULL



Code:
$guid="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$firstpassword="xxxxxxxxxxx";
$secondpassword="xxxxxxxxxxx";
$amounta = "600";
$addressa = "1NfGMB5DNVitjvUKk2UJw2iZH28sAGP6XX";
$recipients = urlencode('{
                  "'.$addressa.'": '.$amounta.'
               }');

$json_url = "https://blockchain.info/merchant/$guid/sendmany?password=$firstpassword&second_password=$secondpassword&recipients=$recipients";

echo $json_url."\n";

$json_data = file_get_contents($json_url);
$json_feed = json_decode($json_data);

var_export($json_feed);