Bitcoin Forum
April 28, 2024, 04:21:12 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Configuring a dice website.  (Read 575 times)
w40ut (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
October 22, 2015, 05:49:01 PM
 #1

Hello,

I have a dice website script, and it uses RPC json in order to get wallet details, make automatic payments, etc.

But when i put my wallet (blockchain and bitcoin-qt) details, it won't connect to the wallet.
But when i put "localhost" as a host it connects. How is that possible?

Regards.
1714278072
Hero Member
*
Offline Offline

Posts: 1714278072

View Profile Personal Message (Offline)

Ignore
1714278072
Reply with quote  #2

1714278072
Report to moderator
1714278072
Hero Member
*
Offline Offline

Posts: 1714278072

View Profile Personal Message (Offline)

Ignore
1714278072
Reply with quote  #2

1714278072
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714278072
Hero Member
*
Offline Offline

Posts: 1714278072

View Profile Personal Message (Offline)

Ignore
1714278072
Reply with quote  #2

1714278072
Report to moderator
1714278072
Hero Member
*
Offline Offline

Posts: 1714278072

View Profile Personal Message (Offline)

Ignore
1714278072
Reply with quote  #2

1714278072
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6551


Just writing some code


View Profile WWW
October 22, 2015, 07:23:42 PM
 #2

But when i put my wallet (blockchain and bitcoin-qt) details, it won't connect to the wallet.
What do you mean by wallet deatils?

But when i put "localhost" as a host it connects. How is that possible?
It needs to connect to the server over the network, and to connect to the local computer, its hostname is localhost. What was it before you changed it?

w40ut (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
October 22, 2015, 07:26:51 PM
 #3

But when i put my wallet (blockchain and bitcoin-qt) details, it won't connect to the wallet.
What do you mean by wallet deatils?

But when i put "localhost" as a host it connects. How is that possible?
It needs to connect to the server over the network, and to connect to the local computer, its hostname is localhost. What was it before you changed it?

The wallet details are:

rpchost=
rpcuser=
rpcpassword
rpcport=

But the host on blockchain isn't localhost. But when i run the script with xampp (locally) and put localhost (running bitcoin-qt) localhost as a rpchost works fine. But when i run the script over the internet (on some test website) and i put rpc.blockchain.info or my IP (from bitcoin-qt) it doesn't work...

I'm kind of "noob" with this.. i only code in C.


Thanks for the answer.
Regards.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6551


Just writing some code


View Profile WWW
October 22, 2015, 07:39:26 PM
 #4

But when i put my wallet (blockchain and bitcoin-qt) details, it won't connect to the wallet.
What do you mean by wallet deatils?

But when i put "localhost" as a host it connects. How is that possible?
It needs to connect to the server over the network, and to connect to the local computer, its hostname is localhost. What was it before you changed it?

The wallet details are:

rpchost=
rpcuser=
rpcpassword
rpcport=

But the host on blockchain isn't localhost. But when i run the script with xampp (locally) and put localhost (running bitcoin-qt) localhost as a rpchost works fine. But when i run the script over the internet (on some test website) and i put rpc.blockchain.info or my IP (from bitcoin-qt) it doesn't work...

I'm kind of "noob" with this.. i only code in C.


Thanks for the answer.
Regards.
rpc.blockchain.info won't work unless you put in the details for their rpc server. What is probably happening is that your firewall is blocking the rpc requests. You need to open up the rpcport you specified (probably 8332) in both the firewalls on server with the bitcoind and on your router.

However, this is highly not recommended. You should have the bitcoind on the server that you are hosting the site on, or at least on the same local network. If you don't then that means that anyone may be able to access the rpc server and access the wallet. It would open it up to the internet and thus open it to attack.

w40ut (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
October 22, 2015, 07:41:17 PM
 #5

Oh.. now i got it.

Many thanks.

Regards.
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!