user2624: I want to create a website which involves the creation of a new single-use address that a user would send bitcoins to. I'd like to know programmatically when the user has sent bitcoins to the address so the website can post a "thank you" note (or do whatever else). What is the best way to do this?
The flow would be:

Website creates and shows user a new single-use address and says, "send bitcoins here"
User sends bitcoins to the address
As soon as the address receives bitcoins, the website says "thank you for sending 0.3 BTC!"

I suppose I could poll the address in question every few minutes, but this is problematic because the user may abandon the website after step 1 (i.e., never send any bitcoins), so the website might end up polling forever.
I am using the official bitcoind client now, but I'm open to using something else.
I understand Blockchain.info provides an API to get push notifications on a given address activity, but I'd rather not rely on a third-party service.

user120: You might want to do amortized polling: use listtransactions to poll the latest transactions over all accounts. So instead of issuing one poll for every account you do it for all of them at the same time. This combined with a timeout to slow down polling if no payment will be received should work fine.

user3633: listsinceblock is more convinient - it can be used incrementally.

user153: Beginning with v0.6.0 of the Bitcoin.org client was -BlockNotify.  Beginning with v0.8.2 of the Bitcoin.org client was -WalletNotify which provides transaction-level notification. 

2624: <p>I want to create a website which involves the creation of a new single-use address that a user would send bitcoins to. I'd like to know programmatically when the user has sent bitcoins to the address so the website can post a "thank you" note (or do whatever else). What is the best way to do this?</p>

<p>The flow would be:</p>

<ol>
<li>Website creates and shows user a new single-use address and says, "send bitcoins here"</li>
<li>User sends bitcoins to the address</li>
<li>As soon as the address receives bitcoins, the website says "thank you for sending 0.3 BTC!"</li>
</ol>

<p>I suppose I could poll the address in question every few minutes, but this is problematic because the user may abandon the website after step 1 (i.e., never send any bitcoins), so the website might end up polling forever.</p>

<p>I am using the official bitcoind client now, but I'm open to using something else.</p>

<p>I understand Blockchain.info provides an API to get push notifications on a given address activity, but I'd rather not rely on a third-party service.</p>
 120: <p>You might want to do amortized polling: use <code>listtransactions</code> to poll the latest transactions over all accounts. So instead of issuing one poll for every account you do it for all of them at the same time. This combined with a timeout to slow down polling if no payment will be received should work fine.</p>
 3633: <p><strong>listsinceblock</strong> is more convinient - it can be used incrementally.</p>
 153: <p>Beginning with <a href="http://en.bitcoin.it/wiki/Changelog#0.6.0.5B3.5D" rel="nofollow">v0.6.0 of the Bitcoin.org</a> client was -BlockNotify.  Beginning with v0.8.2 of the Bitcoin.org client was -WalletNotify which provides transaction-level notification. </p>
