As Crownz81 says it may be better off just using bitcoind on your web server. I've learned it's actually relatively simple to generate an account for the user which gives them a unique deposit address and then monitor it for incoming payments with a bit of php code. The file gets refreshed by an AJAX call every 30 seconds.
This is a simple example with php using session based cookies (which is a bit wasteful as it'll create accounts for each visitor) but something you could build upon:
<?php
session_name("unique_session_name"); // Change as appropriate
session_start();
$coin_platform="BTC";
$rpc_user=""; // rpcuser value from bitcoin.conf here
$rpc_pass=""; // rpcpassword value from bitcoin.conf here
$rpc_port=""; // rpcport value from bitcoin.conf here
$confirmations_required=6; // Minimum confirmations required.
$incoming="";
$transactions=array();
require_once("jsonrpcphp/includes/jsonRPCClient.php");
$client = new jsonRPCClient('http://'.$rpc_user.':'.$rpc_pass.'@127.0.0.1:'.$rpc_port.'/');
if(!isset($_SESSION["account_holder"]))
{
$_SESSION["account_holder"]="guest_".time();
$_SESSION["deposit_address"]=$client->getnewaddress($_SESSION["account_holder"]);
}
$transactions=$client->listtransactions($_SESSION["account_holder"]);
if(count($transactions)>0)
{
foreach($transactions as $value)
{
if($value["category"]=="receive" && $value["amount"]>0 && $value["confirmations"]<$confirmations_required)
{
$incoming.=$value["amount"]. " ".$coin_platform." (".$value["confirmations"]."/".$confirmations_required." confirmations)<br />";
}
}
$incoming=trim($incoming, "<br />");
}
$account_balance=$client->getbalance($_SESSION["account_holder"], $confirmations_required);
if($account_balance==0)
{
echo "\n<table border='1' bordercolor='white' cellpadding='5'>\n";
echo "\t<tr>\n";
echo "\t\t<th>Deposit ".$coin_platform." to</td>\n";
echo "\t\t<th>Incoming</td>\n";
echo "\t</tr>\n";
echo "\t<tr>\n";
echo "\t\t<td>".$_SESSION["deposit_address"]."</td>\n";
echo "\t\t<td>".(($incoming=="")?"N/A":$incoming)."</td>\n";
echo "\t</tr>\n";
echo "</table>\n";
}
else
{
// Do something here (send emails etc?) then move it to the main account
mail("some@one", "Payment received", "This is just to let you know we've received a payment of ".$account_balance." ".$coin_platform.". etc.");
$client->move($_SESSION["account_holder"], "", $account_balance);
die("Thanks for your payment, your order is being processed");
}
?>
Needs a bitcoin daemon and
this