Can you please provide me some demo example how can I access contract functions from a PHP Web Application/Mobile application?

For example, if I want to transfer contract funds/ether to owner account then how can I transfer that using API on test or real network? From myetherwallet it is possible by giving private key.

Just want it from other application using API?

1 Answer 1


Once you deploy the contract you can easily interact with the that contract if you have contract address and ABI. But the main point is that you must have account address.
Account address means that you must have unlocked private key.
while using meta mask it automatically unlock the account but if you use account on web browser you need to unlock the account first to send transaction.
In your case using mobile or any web browser to interact with contract to do transaction using API as you mentioned above use web3js api.
Now for the demo part please view the document of web3js api. There is propraly explained for interaction with contract and you can easily drive it to UX as you can.
Now the question is Which which network of blockchain you are using. let us take example of Titan Blockchain(say) now you must have have account corresponding to this Titan blockchain network. To do transaction regarding to this network you must have contract deployed on this network and account must be associated to this network. After this you have to unlock the account from geth or using web3.
cool , let its help you.

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.