Bitcoin Forum
November 04, 2024, 11:46:52 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help script PHP  (Read 1082 times)
DadoSovr (OP)
Newbie
*
Offline Offline

Activity: 54
Merit: 0



View Profile WWW
October 29, 2012, 09:20:03 AM
 #1

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
Buffer Overflow
Legendary
*
Offline Offline

Activity: 1652
Merit: 1016



View Profile
October 29, 2012, 01:47:26 PM
 #2

I might be wrong, but not sure you can do this in PHP. It can be done with libbitcoin though.

ingrownpocket
Legendary
*
Offline Offline

Activity: 952
Merit: 1000


View Profile
October 29, 2012, 01:52:37 PM
 #3

Can you be more specific?
DadoSovr (OP)
Newbie
*
Offline Offline

Activity: 54
Merit: 0



View Profile WWW
October 29, 2012, 02:19:48 PM
 #4

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
ingrownpocket
Legendary
*
Offline Offline

Activity: 952
Merit: 1000


View Profile
October 29, 2012, 02:26:57 PM
 #5

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 -Take a look at that.

You can create a new subscription to receive transaction details when the subscribed address receives a new payment.
DadoSovr (OP)
Newbie
*
Offline Offline

Activity: 54
Merit: 0



View Profile WWW
October 29, 2012, 02:45:40 PM
 #6

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 -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 Smiley
Buffer Overflow
Legendary
*
Offline Offline

Activity: 1652
Merit: 1016



View Profile
October 29, 2012, 03:47:55 PM
 #7

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

Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
October 29, 2012, 07:03:13 PM
Last edit: October 30, 2012, 05:23:27 AM by Stephen Gornick
 #8

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.



Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


ingrownpocket
Legendary
*
Offline Offline

Activity: 952
Merit: 1000


View Profile
October 29, 2012, 07:24:00 PM
 #9

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.



Satoshi.org? Wut?
BCB
CTG
VIP
Legendary
*
Offline Offline

Activity: 1078
Merit: 1002


BCJ


View Profile
October 29, 2012, 07:26:47 PM
 #10

maybe: bitcoin.org Satoshi client (?)
ingrownpocket
Legendary
*
Offline Offline

Activity: 952
Merit: 1000


View Profile
October 29, 2012, 07:36:45 PM
 #11

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.
Maharichi
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
October 29, 2012, 10:38:30 PM
 #12

I using a simple exec() call to execute bitcoind with parameters really so difficult ?
Buffer Overflow
Legendary
*
Offline Offline

Activity: 1652
Merit: 1016



View Profile
October 29, 2012, 11:13:55 PM
 #13

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.

helloworld
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
October 29, 2012, 11:23:47 PM
 #14

Sounds to me like OP will not be guarding against double-spend attacks, in the way that Satoshi Dice does.
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
October 30, 2012, 05:24:53 AM
 #15

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.

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


DadoSovr (OP)
Newbie
*
Offline Offline

Activity: 54
Merit: 0



View Profile WWW
October 30, 2012, 03:35:38 PM
 #16

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.



Satoshi.org? Wut?
I'm now see the "createrawtransaction" but i don't understand what's "vout"..what's this?
DadoSovr (OP)
Newbie
*
Offline Offline

Activity: 54
Merit: 0



View Profile WWW
October 30, 2012, 04:44:12 PM
 #17

Why when i do the comand: createrawtransaction {13hCmyr7ta8pjiGqAucNSutEZxcUeZrRV7:0.00005,...} bitcoind answere me with this error: Error: Error Parsing Json {13hCmyr7ta8pjiGqAucNSutEZxcUeZrRV7:0.00005,...} Huh?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!