Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Using PHP and darkcoind

Discussion in 'Development Tech Discussion' started by calnaughtonjnr, Mar 24, 2015.

  1. calnaughtonjnr

    calnaughtonjnr Well-known Member
    Foundation Member

    Joined:
    May 25, 2014
    Messages:
    221
    Likes Received:
    157
    Trophy Points:
    203
    Is there anything that can help me use php with darkcoind? Specifically, I need to generate wallet addresses.
     
    • Like Like x 1
  2. oblox

    oblox Well-known Member

    Joined:
    Aug 6, 2014
    Messages:
    1,032
    Likes Received:
    537
    Trophy Points:
    183
    You could always use the paper wallet generator that is an html-based doc for wallet generation with you importing the private key into darkcoind but why not go directly to the source and generate a new address intrawallet. What exactly are you doing?
     
  3. calnaughtonjnr

    calnaughtonjnr Well-known Member
    Foundation Member

    Joined:
    May 25, 2014
    Messages:
    221
    Likes Received:
    157
    Trophy Points:
    203
    A site I'm working on needs to have a wallet address for the user. It's hosted on a server with darkcoind running on it. I was hoping to run a command similar to

    Code:
    darkcoind getnewaddress usersWalletAddr1
    ...but within a php script.
     
  4. thelazier

    thelazier Active Member

    Joined:
    Jan 5, 2015
    Messages:
    240
    Likes Received:
    184
    Trophy Points:
    103
    Dash Address:
    Xreiza1qGJMT5BpW6BDtRJqwtcBSxGwWYN
    Try https://github.com/aceat64/EasyBitcoin-PHP
    I understand that it can also connect to darkcoind rpc as well.
     
    • Like Like x 1
  5. calnaughtonjnr

    calnaughtonjnr Well-known Member
    Foundation Member

    Joined:
    May 25, 2014
    Messages:
    221
    Likes Received:
    157
    Trophy Points:
    203
  6. calnaughtonjnr

    calnaughtonjnr Well-known Member
    Foundation Member

    Joined:
    May 25, 2014
    Messages:
    221
    Likes Received:
    157
    Trophy Points:
    203
    If anyone can help, I'm getting couldn't connect to host error. Is there anyway I can check what port number I should be connecting to in case it's not default?

    Also, should I be using the rpc username and password in my darkcoin.conf?

    Edit: I got it guys. Found a command to list open ports and used that. Running sweet now! :D:D:D:D
     
    #6 calnaughtonjnr, Mar 24, 2015
    Last edited by a moderator: Mar 24, 2015
    • Like Like x 1
  7. jakehaas

    jakehaas Member

    Joined:
    Dec 9, 2014
    Messages:
    41
    Likes Received:
    29
    Trophy Points:
    58
    I could be wrong, but couldn't you just have the PHP execute a shell command to talk to the daemon?