1

I can easily interact with metamask via web3 js like this (JS):

web3 = new Web3(web3.currentProvider);

Is it possible to interact with metamask via php? For example (PHP):

$ethereum = new Ethereum('127.0.0.1', 8545);

Javascript equivalent (JS):

web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));

But the PHP one posted above can only connect to a server node via IP address and I'm not sure if its possible / how to connect with a metamask user in PHP.

I dont think its possible because PHP is server side but if anyone has some insight on this I would appreciate it..

  • 1
    No, what you describe is not possible. – smarx Feb 24 '18 at 0:32
0

No, this is not possible. PHP is executed on the server, JavaScript is executed in the browser. PHP could theoretically connect to a node that you run yourself on your own server, but not to a node on the client or to a browser add-on.

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.