Bitcoin Forum
May 08, 2024, 03:19:30 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: help sendmany - php  (Read 943 times)
evilimprint (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
March 19, 2014, 05:11:13 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);

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715138370
Hero Member
*
Offline Offline

Posts: 1715138370

View Profile Personal Message (Offline)

Ignore
1715138370
Reply with quote  #2

1715138370
Report to moderator
1715138370
Hero Member
*
Offline Offline

Posts: 1715138370

View Profile Personal Message (Offline)

Ignore
1715138370
Reply with quote  #2

1715138370
Report to moderator
seoincorporation
Legendary
*
Offline Offline

Activity: 3150
Merit: 2931


Top Crypto Casino


View Profile
October 02, 2014, 05:47:50 PM
 #2

This code work for me:

Code:
#!/bin/bash
#Guid
gu="xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx"
#Blockchain password
pas="xxxxxxxxxx"
green="1LuckyG4tMMZf64j6ea7JhCz7sDpk6vdcS"
yellow="1LuckyY9fRzcJre7aou7ZhWVXktxjjBb9S"
red="1LuckyR1fFHEsXYyx5QK4UFzv3PEAepPMK"
BTCg="250000"
BTCy="150000"
BTCr="100000"
curl "https://blockchain.info/merchant/$gu/sendmany?password=$pas&recipients=%7B%22$green%22%3A$BTCg%2C%22$yellow%22%3A$BTCy%2C%22$red%22%3A$BTCr%7D&shared=false&fee=10000"

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
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!