<p>Im guessing your on ubuntu because of your username ;)<br>
Step 1 add the bitcoin ppa</p>

<pre>
sudo apt-add-repository ppa:bitcoin/bitcoin
</pre>

<p>Step 2 install bitcoind</p>

<pre>
sudo apt install bitcoind
</pre>

<p>Step 3 set bitcoind up</p>

<pre>
Make a config file with the following contents in /home/$USER/.bitcoin/bitcoin.conf
https://github.com/bitcoin/bitcoin/blob/master/contrib/debian/examples/bitcoin.conf
Replace some parts like rpc password etc
</pre>

<p>Step 4 add walletnotify</p>

<pre>
Walletnotify will run a shell command everytime something changes in your wallet.
I like this repo.
https://github.com/damonp/walletnotify
</pre>

<p>I hope this  helps!  :)</p>

CC BY-SA 3.0
2016-08-13T14:53:59.063Z
Actually I use debian. Old username :p
UbuntuCake
CC BY-SA 3.0
2016-08-13T14:57:07.560Z
Well the concept stays the same install bitcoind and use walletnotify, Build docs: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md
Web Weave
CC BY-SA 3.0
2016-08-13T08:00:36.903Z
2016-08-13T08:00:36.903Z
Web Weave
<p>1.) Install Bitcoin Core on your server.</p>

<p>2.) Add a line to bitcoin.conf file that will fire when any funds are received to any addresses you're watching (ie. walletnotify=/usr/bin/php /home/coind/notify.php %s).  Start bitcoind.</p>

<p>3.) Run "importaddress" function for any addresses you want to watch (ie. bitcoin-cli importaddress 1myaddresshere).</p>

<p>Done.  Any time a tx hits any of the addresses you import, notify.php will automatically fire.</p>

CC BY-SA 3.0
2016-08-13T21:35:03.080Z
2016-08-13T21:35:03.080Z
Envrin Group
<p>I Hope this isn't a duplicated, however I couldn't find anything about this anywhere.
Anyways, I am searching for a way of detecting Bitcoin transactions to a given address. I stumbled across Lazy API, however I couldn't find anything about carrying out what it listed, and I am still not sure how to go about detecting transactions to a given address. I went ahead and went to the given link it provided <a href="https://wiki.bitcoin.com/w/Lazy_API" rel="nofollow">here</a> (and I stumbled across doing using <a href="https://blockexplorer.com/api-ref" rel="nofollow">Transaction By Address</a> from the API reference on blockexplorer, but I am still not clear how to go about detecting if I received a transaction.</p>

<p>Please pardon if this is a stupid question, I am a little new to all of this.
Edit:
I dont wish to relay on another service, unless it is the way Lazy API does it. (Basically complete minimals, from other services.)
 Also someone asked to clarify what I meant by detect a transaction, what I mean is have server recognize when someone completed a transaction, either notifying me to do something (such as ship a package), or giving them some sort of virtual product. </p>

CC BY-SA 3.0
2016-08-13T04:20:05.433Z
Can you clarify what you mean by detect if you received a transaction?  Are you keeping track off addresses on a database? Are you looking for specific code to run once a new transaction is detected on a specific address? How many addresses do you need to do this with? You're going to need to use either a 3rd party API or run bitcoind to query blockchain data.
m1xolyd1an
<transactions><api><php>
Bitcoin Transaction Detection With PHP
UbuntuCake
# Bitcoin Transaction Detection With PHP

(Asked by: username_0 on 2016-08-13)

I Hope this isn't a duplicated, however I couldn't find anything about this anywhere.
Anyways, I am searching for a way of detecting Bitcoin transactions to a given address. I stumbled across Lazy API, however I couldn't find anything about carrying out what it listed, and I am still not sure how to go about detecting transactions to a given address. I went ahead and went to the given link it provided [here](https://wiki.bitcoin.com/w/Lazy_API) (and I stumbled across doing using [Transaction By Address](https://blockexplorer.com/api-ref) from the API reference on blockexplorer, but I am still not clear how to go about detecting if I received a transaction.

Please pardon if this is a stupid question, I am a little new to all of this.
Edit:
I dont wish to relay on another service, unless it is the way Lazy API does it. (Basically complete minimals, from other services.)
Also someone asked to clarify what I meant by detect a transaction, what I mean is have server recognize when someone completed a transaction, either notifying me to do something (such as ship a package), or giving them some sort of virtual product.

**Tags:** transactions, api, php

> **Comments:**
> **username_1**: Can you clarify what you mean by detect if you received a transaction?  Are you keeping track off addresses on a database? Are you looking for specific code to run once a new transaction is detected on a specific address? How many addresses do you need to do this with? You're going to need to use either a 3rd party API or run bitcoind to query blockchain data.  

---

## 2 answers

### Answer by username_2 on 2016-08-13. Score: 2

Im guessing your on ubuntu because of your username ;)
Step 1 add the bitcoin ppa

sudo apt-add-repository ppa:bitcoin/bitcoin

Step 2 install bitcoind

sudo apt install bitcoind

Step 3 set bitcoind up

Make a config file with the following contents in /home/$USER/.bitcoin/bitcoin.conf
https://github.com/bitcoin/bitcoin/blob/master/contrib/debian/examples/bitcoin.conf
Replace some parts like rpc password etc

Step 4 add walletnotify

Walletnotify will run a shell command everytime something changes in your wallet.
I like this repo.
https://github.com/damonp/walletnotify

I hope this  helps!  :)

> **Comments:**
> **username_0**: Actually I use debian. Old username :p  
> **username_2**: Well the concept stays the same install bitcoind and use walletnotify, Build docs: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md  

---

### Answer by username_3 on 2016-08-13. Score: 1

1.) Install Bitcoin Core on your server.

2.) Add a line to bitcoin.conf file that will fire when any funds are received to any addresses you're watching (ie. walletnotify=/usr/bin/php /home/coind/notify.php %s). Start bitcoind.

3.) Run "importaddress" function for any addresses you want to watch (ie. bitcoin-cli importaddress 1myaddresshere).

Done. Any time a tx hits any of the addresses you import, notify.php will automatically fire.


---

