Bitcoin Forum
February 12, 2026, 05:02:16 PM *
News: Latest Bitcoin Core release: 30.2 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Blockchain.info HTTP JSON String for Payement notifications on: June 05, 2012, 10:14:12 AM
Hi Bitcoin fans Smiley

I am currently building a website with PHP/SQL to sell products in Bitcoins (Nice Swiss stuff...watch out!) and am willing to verify if an amount has been sent to a bitcoin adress I provide when submitting a form.

I have to list the adresses which contains Bitcoins along with their payement status(show amount if verified), so I am looking for the simplest way of doing this.

I found out this piece of code, regarding blockexplorer:

Quote
$Awallets = $row['wallet'];
$Live_Address_Scan = "http://blockexplorer.com/q/getreceivedbyaddress/$Awallets";
$ch = curl_init($Live_Address_Scan);
curl_setopt($ch, CURLOPT_REFERER, 'Mozilla/5.0 (compatible; GetReceivedBy; '.php_uname('s').'; PHP/'.phpversion().')');
curl_setopt($ch, CURLOPT_USERAGENT, "CakeScript/0.1");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$Donated_Bitcoins = curl_exec($ch);
curl_close($ch);

But eventually there are some 'moments' where blockexplorer cannot be sollicited so an error message shows up in the field where the amount should appear  Embarrassed

'Database overload...'

I then came up about blockchain and I have to use this specific code:

Quote
HTTP Post

A HTTP POST request will be made on payment sent or received to URL provided on your My Account page. The POST body will contain one "payload" variable which contains JSON data about the transaction. Any effect on your wallet will need to be calculated by your server.

e.g. Access JSON using php

$_POST['payload']

{
    "hash": "bf8648b06160ded3274d6054cfeadd95f762271170070429ef40d62ac5452c4b",
    "ver": 1,
    "vin_sz": 1,
    "vout_sz": 2,
    "lock_time": "Unavailable",
    "size": 258,
    "relayed_by": "71.238.174.98",
    "tx_index": 13903761,
    "time": 1325700693,
    "inputs": [
        {
            "prev_out": {
                "hash": "e417eb0889a1870e6b500ad8769cb7110739749e",
                "addr": "1Mo3ibZuqZpsBGimyfmUnYDiZoU44VbAJV",
                "value": 438000000,
                "tx_index": 13902462,
                "n": 1
            }
        }
    ],
    "out": [
        {
            "value": 215000000,
            "hash": "6c835372a306b2e253f896801cb0b5703d60114c",
            "addr": "1AtmJQYUCVZSwoLkQvEvFhtoRfwn4Eumuu"
        },
        {
            "value": 222000000,
            "hash": "60ce49cd97aa152e1db8a76c1b62c55ae3b059d3",
            "addr": "19przaW7NeE96SEVtKGWdGM3CuKVaSYhrS"
        }
    ]
}
         

As a rudimentary form of verification the HTTP server should respond by printing the user's wallet identifier.

echo '0aef6e46-2422-6d4c-772c-bacccf378b6b';


I managed to have a recognized listener adress along with the echo 'wallet', but then, how do I parse this JSON string? May I ask if someone could point me to the right direction or even show me some code? I do not know how to 'begin', like is it in a <?php tag or something different?

A thousands thanks in advance,

 Smiley
2  Economy / Services / [ART] - Draw your name in Graffiti style * ! NEw preVieWs ! * on: May 25, 2012, 10:18:46 PM
I will draw any name in graffiti style on a white A4 sheet of paper (A4),
scan it and then send it to you as an electronic version of your artwork

>> I will ship it to you for 3 BTC more Smiley


-----------------------------------
1 BTC · Black & white Sketche
-----------------------------------
· Done with pencils
· Custom letters (letters only!)





--------------------------
3 BTC · Color Sketche
--------------------------
· Done with pencils
· Custom letters (letters only!)





-----------------------------------
50 BTC · Real outdoor Graffiti
-----------------------------------
· Will be done in my town with spray cans in a legal spot
· Fully customizable (size, colors, letters)
· Pictures sent to you




NB : I will NOT be able to ship you the wall, so forget about shipping that one  Tongue


I am able to write your name in various ways, so let me know your preferred colors if needed and let me know about the style you would like to have your letter written with : simple(readable), wild(harder to read but very artistic), bubble or squared style...

Upon request, I may do some nice custom calligraphy tags too...

Interested? Make my bitcoin adress EXPLODE^^^^

Thank you !

Cheers

Bat1
3  Local / Petites annonces / Recherche bitcoins :) on: May 22, 2012, 02:10:29 PM
Bonjour à toutes et à tous!

Je suis nouveau dans le domaine des Bitcoins et j'ai beaucoup de mal à gagner mon premier denier^^

N'y aurait-il pas une âme charitable qui accepterait de m'aider à démarrer ma nouvelle fortune  Grin

Je sais programmer en HTML, CSS, PHP, Wordpress... peut-être quelqu'un a-t'il un petit boulot à me proposer...

Je fais également des graffitis et je peux écrire votre nom ou tout autre texte en graff, le scanner et vous l'envoyer en échange de Bitcoins!

Je tente ma chance ici pour demander un coup de boost Tongue

Je vous remercie d'avance et vous souhaite plein d'amour en Bitcoin^^^^

Bat

13crAo5Ap98GwUAjAQSdtF8grA9CvH3azW
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!