Bitcoin Forum
December 05, 2016, 12:38:25 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How to make a script that verify's received Bitcoins?  (Read 672 times)
pippipcheerio
Jr. Member
*
Offline Offline

Activity: 42


View Profile
June 27, 2011, 05:37:19 AM
 #1

How do I make a script that will verify bitcoins received under my address?

Preferably PHP.
1480898305
Hero Member
*
Offline Offline

Posts: 1480898305

View Profile Personal Message (Offline)

Ignore
1480898305
Reply with quote  #2

1480898305
Report to moderator
1480898305
Hero Member
*
Offline Offline

Posts: 1480898305

View Profile Personal Message (Offline)

Ignore
1480898305
Reply with quote  #2

1480898305
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480898305
Hero Member
*
Offline Offline

Posts: 1480898305

View Profile Personal Message (Offline)

Ignore
1480898305
Reply with quote  #2

1480898305
Report to moderator
1480898305
Hero Member
*
Offline Offline

Posts: 1480898305

View Profile Personal Message (Offline)

Ignore
1480898305
Reply with quote  #2

1480898305
Report to moderator
1480898305
Hero Member
*
Offline Offline

Posts: 1480898305

View Profile Personal Message (Offline)

Ignore
1480898305
Reply with quote  #2

1480898305
Report to moderator
jerfelix
Sr. Member
****
Offline Offline

Activity: 266


View Profile
June 27, 2011, 11:15:45 AM
 #2

How do I make a script that will verify bitcoins received under my address?

Preferably PHP.
Option 1:  Run Bitcoin Client on your PHP machine, and set up JSON-RPC.  You can set your config file for Bitcoin client software to allow JSON-RPC calls.  And then your PHP code would call the JSON-RPC software, passing the queries to get the balance of a certain wallet ID.

See https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29#PHP
and https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list
and https://en.bitcoin.it/wiki/Running_Bitcoin for bitcoin conf settings

You can call "getbalance" to see if it has a positive, confirmed balance.

Option 2: Hit the Blockexplorer.com site with your address.  This is lame, but can be a quick and dirty method.  Just don't hit it every half second, and code to handle potential outages.

Option 3:  Set up a remote machine with the code on it as described in Option 1, and communicate between your remote machine and your server.  That way your "wallet" is one step removed from the web server.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!