Guidelines for creating a PHP driven web app for redeeming Bitcoin coupons 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]
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.