Title: Help script PHP Post by: DadoSovr on October 29, 2012, 09:20:03 AM hi,
I'm new on this forum I wanted to ask your help. I am developing a portle like satoshidice but not identical with different games and not just gambling. I developed all in php but i'm "FIGHT" with the API of blockchain.info. everything works perfectly but I can not create a script in php that individuals immediately address of the person who bet so as to restore immediately the win / loss. You know you help me? thank you all dadosovr Title: Re: Help script PHP Post by: Buffer Overflow on October 29, 2012, 01:47:26 PM I might be wrong, but not sure you can do this in PHP. It can be done with libbitcoin though.
Title: Re: Help script PHP Post by: ingrownpocket on October 29, 2012, 01:52:37 PM Can you be more specific?
Title: Re: Help script PHP Post by: DadoSovr on October 29, 2012, 02:19:48 PM Can you be more specific? Of course excuse me, I will make an example, when a person makes a bet (bets being instantaneous) I must immediately return his winnings if he won, but to do this I need to know the address where the bitcoin sent to my address. And I could use a script in php or java that interfaces with the API blockchain and give me back instantly all the information of the transaction!Thank dadosovr Title: Re: Help script PHP Post by: ingrownpocket on October 29, 2012, 02:26:57 PM Can you be more specific? Of course excuse me, I will make an example, when a person makes a bet (bets being instantaneous) I must immediately return his winnings if he won, but to do this I need to know the address where the bitcoin sent to my address. And I could use a script in php or java that interfaces with the API blockchain and give me back instantly all the information of the transaction!Thank dadosovr http://blockchain.info/api/api_websocket (http://blockchain.info/api/api_websocket) -Take a look at that. You can create a new subscription to receive transaction details when the subscribed address receives a new payment. Title: Re: Help script PHP Post by: DadoSovr on October 29, 2012, 02:45:40 PM Can you be more specific? Of course excuse me, I will make an example, when a person makes a bet (bets being instantaneous) I must immediately return his winnings if he won, but to do this I need to know the address where the bitcoin sent to my address. And I could use a script in php or java that interfaces with the API blockchain and give me back instantly all the information of the transaction!Thank dadosovr http://blockchain.info/api/api_websocket (http://blockchain.info/api/api_websocket) -Take a look at that. You can create a new subscription to receive transaction details when the subscribed address receives a new payment. I've seen this and would do right in my case, the problem is that I'm not a genius of the programming: P and can not make a script with this, maybe there is someone who could help me :) Title: Re: Help script PHP Post by: Buffer Overflow on October 29, 2012, 03:47:55 PM I would use libbitcoin myself. Though it won't be easy to use. Also there are no PHP bindings.
https://bitcointalk.org/index.php?topic=30646 (https://bitcointalk.org/index.php?topic=30646) Title: Re: Help script PHP Post by: Stephen Gornick on October 29, 2012, 07:03:13 PM I developed all in php but i'm "FIGHT" with the API of blockchain.info. Blockchain.info is a third party service. You might want to rethink using a data feed from third party service for the purpose of paying out funds. The Bitcoin.org [edited] client gives you all the data needed using Raw Transactions: - http://en.bitcoin.it/wiki/Raw_Transactions GetRawTransaction DecodeRawTransaction and perhaps ListSinceBlock or ListUnspent will be ones you'll use as well. Title: Re: Help script PHP Post by: ingrownpocket on October 29, 2012, 07:24:00 PM I developed all in php but i'm "FIGHT" with the API of blockchain.info. Blockchain.info is a third party service. You might want to rethink using a data feed from third party service for the purpose of paying out funds. The Satoshi.org client gives you all the data needed using Raw Transactions: - http://en.bitcoin.it/wiki/Raw_Transactions GetRawTransaction DecodeRawTransaction and perhaps ListSinceBlock or ListUnspent will be ones you'll use as well. Title: Re: Help script PHP Post by: BCB on October 29, 2012, 07:26:47 PM maybe: bitcoin.org Satoshi client (?)
Title: Re: Help script PHP Post by: ingrownpocket on October 29, 2012, 07:36:45 PM maybe: bitcoin.org Satoshi client (?) I find it hard that he will be capable of using bitcoind if he already has enough problems doing an PHP API call.Title: Re: Help script PHP Post by: Maharichi on October 29, 2012, 10:38:30 PM I using a simple exec() call to execute bitcoind with parameters really so difficult ?
Title: Re: Help script PHP Post by: Buffer Overflow on October 29, 2012, 11:13:55 PM I using a simple exec() call to execute bitcoind with parameters really so difficult ? No, but my concern would be how scaleable that method is. Title: Re: Help script PHP Post by: helloworld on October 29, 2012, 11:23:47 PM Sounds to me like OP will not be guarding against double-spend attacks, in the way that Satoshi Dice does.
Title: Re: Help script PHP Post by: Stephen Gornick on October 30, 2012, 05:24:53 AM Satoshi.org? Wut? Heh, ya. I had typed Satoshi client, and then remembered the right way to describe it is the Bitcoin.org client. Sorry. Title: Re: Help script PHP Post by: DadoSovr on October 30, 2012, 03:35:38 PM I developed all in php but i'm "FIGHT" with the API of blockchain.info. Blockchain.info is a third party service. You might want to rethink using a data feed from third party service for the purpose of paying out funds. The Satoshi.org client gives you all the data needed using Raw Transactions: - http://en.bitcoin.it/wiki/Raw_Transactions GetRawTransaction DecodeRawTransaction and perhaps ListSinceBlock or ListUnspent will be ones you'll use as well. Title: Re: Help script PHP Post by: DadoSovr on October 30, 2012, 04:44:12 PM Why when i do the comand: createrawtransaction {13hCmyr7ta8pjiGqAucNSutEZxcUeZrRV7:0.00005,...} bitcoind answere me with this error: Error: Error Parsing Json {13hCmyr7ta8pjiGqAucNSutEZxcUeZrRV7:0.00005,...} ????
|