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
• 26,740 points
3,082 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,350 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
• 26,740 points
443 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
• 69,210 points
1,442 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 1,354 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 27, 2018 in Blockchain by Johnathon
• 9,090 points
1,642 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,215 views
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
• 26,740 points
1,797 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
• 69,210 points
4,640 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP