Hmm thanks for the replies.
These methods would definitely work, but I also want to see if its possible to do this without relying on someone elses website/ email service.
I guess at that point you are looking at running a node yourself and analyzing the blockchain as new transactions come in.
This would be a lot more work but its a project I'm interested in since I'm trying to improve my programming skills and learn more about Bitcoin.
I posted an answer to this a few months back on bitcoin.stackexchange
http://bitcoin.stackexchange.com/questions/44373/how-would-one-monitor-an-address-for-a-transaction-and-1-confirmation-in-phpStart a new node at home that will be connected 24/7.
In your bitcoin.conf set a walletnotify
Make sure the address you are monitoring is imported into your bitcoind wallet.
Set wallet notify up in your bitcoin.conf
walletnotify=curl https://yourwebsite.com/script.php?txid=%s
Now anytime there is activity on your bitcoind wallet your script will run, with the transaction id stored in a GET under `["txid"]` and then you can do a script like:
require("easybitcoin.php");
$bitcoin = new Bitcoin("someusername", "somepassword");
$txid = $_GET["tx"];
$txinfo = $bitcoin->gettransaction($txid);
$details = count($txinfo["details"]);
for($i=0;$i<$details;$i++){
$check = $txinfo["details"][$i]["address"];
$addy = "1SomeAddressToMonitor";
if($check == $addy){
//activity on your address, do something like send an email
$email = "my@email.com";
$subject = "New Activity";
$body - "There was a transaction on ".$addy.". The transaction ID is ".$txid;
mail($email, $subject, $body);
}
}