user862: I would like to issue Bitcoin coupons with a given USD value. The redeeming web app should accept the coupon pin-code and a Bitcoin address and transfer bitcoins to that address according to the current exchange rate. I'm looking for a quick / simple solution, preferably with PHP. Looking for design guidelines and any advice to help me get started.
[edit]
To be more specific:

Is there a sample code for sending coins using bitcoind / PHP ?
Is there a 3d party API providing such functionality (instead of using bitcoind)?
Do MtGox and Tradehill have APIs for transfers?
Is captcha a must?

[end edit]

user659: I modified the open source Intersango exchange code so that it can issue and accept Bitcoin coupons.  You can view the code to see how I did it.  My code doesn't store the whole coupon code in the database, so even if a hacker gains read access to the database, they can't redeem the unclaimed coupons.
To answer your particular questions:
1) Is there a sample code for sending coins using bitcoind / PHP ?
Yes.  Here's some code that does it in a very simple way.
2) Is there a 3d party API providing such functionality (instead of using bitcoind)?
I don't know.  Maybe one of these has what you want.
3) Do MtGox and Tradehill have APIs for transfers?
Tradehill's no longer operating.  MtGox does.
4) Is captcha a must?
No.  They're annoying.  Have the code which checks the coupons take a long time to return a result, and only allow the users to check one at a time.  Then they can't brute force the coupons in reasonable time.

862: <p>I would like to issue Bitcoin coupons with a given USD value. The redeeming web app should accept the coupon pin-code and a Bitcoin address and transfer bitcoins to that address according to the current exchange rate. I'm looking for a quick / simple solution, preferably with PHP. Looking for design guidelines and any advice to help me get started.</p>

<p>[edit]
To be more specific:</p>

<ol>
<li>Is there a sample code for sending coins using bitcoind / PHP ?</li>
<li>Is there a 3d party API providing such functionality (instead of using bitcoind)?</li>
<li>Do MtGox and Tradehill have APIs for transfers?</li>
<li>Is captcha a must?</li>
</ol>

<p>[end edit]</p>
 659: <p>I modified the open source Intersango exchange code so that it can issue and accept Bitcoin coupons.  You can <a href="https://github.com/dooglus/intersango/blob/aud/voucher.php" rel="nofollow">view the code</a> to see how I did it.  My code doesn't store the whole coupon code in the database, so even if a hacker gains read access to the database, they can't redeem the unclaimed coupons.</p>

<p>To answer your particular questions:</p>

<p>1) Is there a sample code for sending coins using bitcoind / PHP ?</p>

<p>Yes.  <a href="https://github.com/dooglus/intersango/blob/4f509499f24481d4a2c8fad795fb7b42ab2c450b/util.php#L592" rel="nofollow">Here's some code</a> that does it in a very simple way.</p>

<p>2) Is there a 3d party API providing such functionality (instead of using bitcoind)?</p>

<p>I don't know.  Maybe <a href="http://lovebitcoins.org/getStarted.html" rel="nofollow">one of these</a> has what you want.</p>

<p>3) Do MtGox and Tradehill have APIs for transfers?</p>

<p>Tradehill's no longer operating.  <a href="https://en.bitcoin.it/wiki/MtGox/API/HTTP/v0#0.2Fwithdraw.php" rel="nofollow">MtGox does</a>.</p>

<p>4) Is captcha a must?</p>

<p>No.  They're annoying.  Have the code which checks the coupons take a long time to return a result, and only allow the users to check one at a time.  Then they can't brute force the coupons in reasonable time.</p>
