user1441: How do I find out which addresses are the inputs of a given transaction, given its transaction ID?
I know there is a way, as satoshidice.com uses this.
I would like to do this with own software and not rely on some third party provider, which could easily kill their service.
EDIT:
Basically I'm creating a PHP project, where I need to find out when a new transaction arrives and which address sent it. So I need a way to get a notification or start a PHP script (called with needed variables [txid, sender address, receiving address, value]) when a new transaction arrives.

user153: The Bitcoin.org client doesn't provide this.
I believe your options are:

Armory
libbitcoin
ABE blockchain explorer
BitcoinJ http://code.google.com/p/bitcoinj


user2547: I just answered a similar question. The relevant parts are:
It is now possible to determine the list of addresses that sent a transaction using the raw transaction JSON-RPC API calls that were released with bitcoind and bitcoin-qt version 0.7. The pseudo-code to accomplish this is:
txid = <relevant transaction id>
addresses = []
raw_tx = decoderawtransaction(getrawtransaction(txid))
for(input in raw_tx['vin']) {
  input_raw_tx = decoderawtransaction(getrawtransaction(input['txid']))
  addresses.push(input_raw_tx['vout'][input['vout']]['scriptPubKey']['addresses'][0])
}


1441: <p>How do I find out which addresses are the inputs of a given transaction, given its transaction ID?
I know there is a way, as satoshidice.com uses this.
I would like to do this with own software and not rely on some third party provider, which could easily kill their service.</p>

<p>EDIT:</p>

<p>Basically I'm creating a PHP project, where I need to find out when a new transaction arrives and which address sent it. So I need a way to get a notification or start a PHP script (called with needed variables [txid, sender address, receiving address, value]) when a new transaction arrives.</p>
 153: <p>The Bitcoin.org client doesn't provide this.</p>

<p>I believe your options are:</p>

<ul>
<li>Armory</li>
<li>libbitcoin</li>
<li>ABE blockchain explorer</li>
<li>BitcoinJ <a href="http://code.google.com/p/bitcoinj" rel="nofollow">http://code.google.com/p/bitcoinj</a></li>
</ul>
 2547: <p>I just answered <a href="https://bitcoin.stackexchange.com/questions/2667/whats-the-best-way-for-a-website-to-detect-payments-from-green-addresses/5981#5981">a similar question</a>. The relevant parts are:</p>

<p>It is now possible to determine the list of addresses that sent a transaction using the raw transaction <a href="https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list" rel="nofollow noreferrer">JSON-RPC API</a> calls that were released with bitcoind and bitcoin-qt version 0.7. The pseudo-code to accomplish this is:</p>

<pre><code>txid = &lt;relevant transaction id&gt;
addresses = []
raw_tx = decoderawtransaction(getrawtransaction(txid))
for(input in raw_tx['vin']) {
  input_raw_tx = decoderawtransaction(getrawtransaction(input['txid']))
  addresses.push(input_raw_tx['vout'][input['vout']]['scriptPubKey']['addresses'][0])
}
</code></pre>
