Php code to generate Ethereum wallets.

0 votes
I want to generate Ethereum wallets for users in the network and as it a web based app, I want to use php or web3 for it. I want to generate private and public keys as well.. How can I do it?
Jul 27, 2018 in Blockchain by digger
• 27,620 points
350 views

1 answer to this question.

0 votes

You can use web3.eth.accounts in web3js

web3.eth.accounts.create();

With Php, you can try something like this:

newAccount = '';
$web3->personal->newAccount('123456', function ($err, $account) use(&$newAccount) {
    if ($err !== null) {
        echo 'Error: ' . $err->getMessage();
        return;
    }
    $newAccount = $account;
    echo 'New account: ' . $account . PHP_EOL;
});

To know more, visit: https://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html#create

answered Jul 27, 2018 by slayer
• 29,050 points

Related Questions In Blockchain

0 votes
1 answer

How to get results by running the voting code on Ethereum?

In mist go to your contract and ...READ MORE

answered Sep 18, 2018 in Blockchain by digger
• 27,620 points
26 views
0 votes
1 answer

PHP IPC with geth Ethereum: How to communicate with client?

You have to use PHP Sockets $sock = socket_create(AF_UNIX, ...READ MORE

answered Oct 22, 2018 in Blockchain by Omkar
• 67,140 points
102 views
0 votes
1 answer

How to make sure transactions take no fee in a private Ethereum blockchain?

In a private ethereum network you have ...READ MORE

answered Mar 26, 2018 in Blockchain by Christine
• 15,790 points

edited Mar 26, 2018 by Christine 72 views
+1 vote
1 answer

How to deploy ethereum smart contracts on a website?

There are many ways to do this: 1 ...READ MORE

answered Mar 26, 2018 in Blockchain by Johnathon
• 9,070 points
66 views
0 votes
1 answer
0 votes
1 answer

How to create a Genesis Block in a Private Network?

{     "nonce": "0x0000000000000042",     "difficulty": "0x000000100",     "alloc": {     },     "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",     "coinbase": "0x0000000000000000000000000000000000000000",     "timestamp": "0x00",     "parentHash": ...READ MORE

answered Jul 12, 2018 in Blockchain by digger
• 27,620 points
129 views
0 votes
1 answer
0 votes
2 answers

How to generate ethereum qr code address with amount?

You implement this package: ethereum-qr-code. It implements the EIP67 standard which uses ...READ MORE

answered Sep 6, 2018 in Blockchain by Omkar
• 67,140 points
363 views
0 votes
1 answer