1

I'm trying to develop a web application that interacts with web3. I have to create accounts, wallet and perform transaction. I'd like to know which is the best way to interact with web3 on the server side.

1

Since you mentioned you're using PHP on the server side, check out the ethereum-php client.

require __DIR__ . '/vendor/autoload.php';
use Ethereum\Ethereum;

try {
    $eth = new Ethereum('https://mainnet.infura.io');
    echo $eth->eth_protocolVersion()->val();
}
catch (\Exception $exception) {
    die ("Unable to connect.");
}
| improve this answer | |
0

To interact with the Ethereum network you need to be able to communicate with a node.

The web3 library does exactly this but it is for JavaScript. For other languages you need to find a library that has the JSON-RPC calls implemented or write your own library that does this.

| improve this answer | |
0

On the server side, we have another native golang binding with smart contract, we dont need to use web3

https://github.com/ethereum/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.