you add the script to run in your bitcoin.conf:
blocknotify= %s
walletnotify= %s
alertnotify= %s
and when blocks or notifications come in the script will be called with arguments.
for example if you use blocknotify the argument will be the block id e.g. 000000000000000003a5ff0d28a8f9b71623c2328727937160582d1b44cb3cec, if you use walletnotify then the argument will be the new transaction id that came in, e.g. 1e621e60f7ea7195ff1ec7c31867dc7c9d896123ead6ec43f053f51137c31676
make yourself a script (python or your favorite language) that logs the arguments somewhere and test it out with the scenarios you want.
Yes that is what I would like to do, but I am using the blockchain daemon, so I don't have access to their file system or anything. Would it be possible to notify a outside course, like on my website? I don't know if walletnotify works on the blockchain daemon, does anyone know?