Author

Topic: Api blockchain (Read 101 times)

sr. member
Activity: 476
Merit: 299
Learning never stops!
May 19, 2024, 02:45:42 PM
#5

uniqid() is part of PHP (see: Miscellaneous Functions).

I did try it on laravel also..
Although there's no toomuch difference but there was no repetition only with the second & last value...





uniqid() is a bad choice Cryptography  Tongue
legendary
Activity: 2758
Merit: 6830
May 18, 2024, 09:25:03 PM
#4
BTW, I'd take a peek at this user's trust page before deciding whether or not they're worth helping.
Wait, is bud literally asking for help to create a fake-wallet phishing scam? Godammit. Tongue

Thanks for the warning (trust not showing up by default on this board etc).
hero member
Activity: 510
Merit: 4005
May 18, 2024, 09:22:28 PM
#3
Where is the uniqid() function coming from?
uniqid() is part of PHP (see: Miscellaneous Functions).

BTW, I'd take a peek at this user's trust page before deciding whether or not they're worth helping.
legendary
Activity: 2758
Merit: 6830
May 18, 2024, 05:49:23 PM
#2
Which errror/response are you getting from the API?

Where is the uniqid() function coming from? thanks PowerGlove, wasn't aware of php functions.
copper member
Activity: 123
Merit: 39
May 18, 2024, 03:06:44 PM
#1

The code does not work and Bitcoin addresses are not received. What is the solution to this problem? Can someone solve the problem for me?

/*
 * ----------------------------------------------------------------------------
 * The way to use a simple programming function  : blockchain
 * Submitted by 0x32
 * ----------------------------------------------------------------------------
 */
 
The first step is to submit an order : https://www.blockchain.com/api/request
The second step is to add this code in your design with modification to some things
 * ----------------------------------------------------------------------------*
$api_key = "api"; /your api
$xpub = "xpub"; /your xpub
$secret = "your_secret"; //this can be anything you want
$rootURL = "your site"; $orderID = uniqid();  /your web site
$callback_url = $rootURL."/callback.php?invoice=".$orderID."&secret=".$secret;
$receive_url = "https://api.blockchain.info/v2/receive?key=".$api_key."&xpub=".$xpub."&callback=".urlencode($callback_url);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $receive_url);
$ccc = curl_exec($ch);
$json = json_decode($ccc, true);
$payTo = $json['address'];
echo $payTo; // The API places you where your random address will appear.
?>
 * ----------------------------------------------------------------------------*

/*
 * ----------------------------------------------------------------------------
 * The way to use a simple programming function  : blockchain
 * Submitted by 0x32
 * ----------------------------------------------------------------------------
 */
 
Jump to: