Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [php]

Questions regarding the use of the PHP scripting language with Ethereum.

0
votes
0answers
13 views

Etherscan apikey error in laravel

Etherscan apikey returns an error This is my code: namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Models\AdminSettings; use App\Models\User; use Auth; define('APIURL', 'http:/...
1
vote
1answer
38 views

Initiate transaction from server to smart contract

In my case, i have an API written in PHP which periodically checks the database. If certain condition was met, i need to send an alert message from the API to an account/node in the Ethereum ...
1
vote
0answers
138 views

Ethereum Transaction Using cUrl and web3.php, I get a Receipt but the Transaction is not sent to the Network

This has been doing my head in all day, after wading through and managing to get all my values converted to hex I create and sign the ethereum transaction using the web3p/ethereum-tx library from ...
1
vote
1answer
54 views

My web3.php installation question

How can I install web3.php? Can I use shared hosting to run it or I must use vps, if I use vps I must use root to install web3.php? Thanks.
1
vote
0answers
287 views

Unable to locate package php5.6-mbstring [closed]

root@iZwz98r5jfsgx41dfymo6iZ:/usr/local/lib# sudo apt-get install php5.6-mbstring Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package ...
1
vote
1answer
189 views

Invalid sender when sending Raw Transaction, signed w/ ethereum-tx on PHP

I am using PHP and ethereum-tx library https://github.com/web3p/ethereum-tx to sign transactions but when trying to send them to the node I got an "invalid sender" error. Besides, exactly the same ...
1
vote
0answers
39 views

Ethereum js wallet for php

https://github.com/ethereumjs/ethereumjs-wallet I need this library with the same functions in PHP Would u give me the link
0
votes
1answer
35 views

how to pass value to contract via php (no java script)?

I wrote a contract that get a unit and do something My question : How to pass a value to this contract function via PHP? (not js,py,MetaMask, ... . just in php) For example, I use this and install ...
0
votes
1answer
67 views

How do I check the Ethereum balance and unique transactions count of a Smart Contract over a period of time?

Basically I want to be able to track smart contracts balance and unique transactions over a period of time such as , last 24hours, last hour and so. What would be the best approach into doing this? ...
0
votes
1answer
29 views

Unable to Generate Address Endpoint Blockcypher

I am trying to generate an address using Blockcyphers Address Endpoint using cUrl. - https://api.blockcypher.com/v1/eth/main/addrs?token=eth But it returns this error - "Endpoint not found. Please ...
0
votes
1answer
54 views

getting result of a method of smart contract that don't change any state variables

I know in ethereum if a method of smart contract don't change state variables we can see it's result without making any transaction. now I want to know how can see result of this method ...
1
vote
0answers
129 views

Recovered Sender Address from Raw Transaction

I'm trying this code example : https://thomasclowes.com/verifying-an-ethereum-signature-on-the-server-php-2/ Expected $recoveredSenderAddress = 0xd5bfc359c3a377bb8afd41db8ffc8d1349718233 Actual $...
0
votes
1answer
224 views

generating raw trx and sending it to the network shows “invalid sender” error

I'm trying to make an ethereum raw transaction by php and these libraries: https://github.com/simplito/elliptic-php https://github.com/kornrunner/php-keccak https://github.com/web3p/rlp this is my ...
1
vote
0answers
94 views

Any easy php script to sign and send transactions maybe run contract also

Thanks I have JavaScript version but not php version especially for sign and send transaction
0
votes
2answers
592 views

How to fetch ETH/USD price from the coinmarketcap api

I want to fetch the current ETH-USD price from this api (https://api.coinmarketcap.com/v1/ticker/ethereum/?convert=USD). How do I fetch just the price into a variable in PHP for reuse on my ...
1
vote
0answers
497 views

How to transfer tokens from smart contract using PHP?

I want to transfer tokens using PHP script and that script will be executed using cronjob, is there library available to transfer by unlocking account using private key?
0
votes
1answer
95 views

Ethereum-PHP How to receive outbound parameters from smart contract function

In contract sol file I have function definition: function product(uint32 _prdId) public view returns (uint32 prdId, string prdName, address prd, uint closeTime, uint promoTime,uint8 bonus, ...
1
vote
1answer
357 views

Ethereum-PHP Calling contract function with parameter

I'm not the author of Ethereum part but have to connect to using php. Choosen Ethereum-PHP package (https://github.com/digitaldonkey/ethereum-php). Have connection to ethereum and smart contract but ...
2
votes
1answer
471 views

Ethereum address genеration and keccаk256

I'm trying to generate eth address on PHP. Having issue with keccak256. I'm using this class: https://github.com/kornrunner/php-keccak It works good, I checked many times on https://emn178.github.io/...
0
votes
2answers
306 views

How to make an action to send record to my database?

I want all transaction of the tokens send to my database through smart contract. For example, A send 10Token to B, it will show on blockchain, but I also want a function which smart contract will let ...
0
votes
1answer
403 views

Failed RLPx handshake

I am trying to use https://github.com/kesar/ethereum-php on the back-end of my web site. I followed a tutorial http://iotbl.blogspot.ca/2017/03/setting-up-private-ethereum-testnet.html to set up two ...
1
vote
1answer
171 views

Dapp fundamental q about listening solidity events

Sol: I created contract with events that are raised when is called some function. Html fo: Those functions are called via web3.js with abi and address - easy. Backend (no js) asp or php: I am not ...
0
votes
2answers
2k views

How to transfer ETH between two addresses using geth and json rpc

I have geth running on my server. I am building a php website which act as wallet. Now iam able to create addresses. I need to be able to deposit and withdraw ETH between addresses on same node. I ...
1
vote
1answer
609 views

Interact with MetaMask via PHP

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('...
1
vote
2answers
439 views

Why doesn't my verification of a signed message signature work in PHP?

I am attempting to verify a signed message in PHP. To be clear, I am not looking to interface with JSON-RPC or any external service, which I both a) know works and b) successfully verifies the ...
0
votes
1answer
142 views

Automating Listing Addresses and Balances Using PHP

I want to incorporate a javascript in php that list all the accounts and shows balances for those. This is my script for that: <script language="javascript"> function checkAllBalances() { var ...
1
vote
1answer
1k views

Generate Ethereum address in PHP?

I am working on a web application where I need to generate Ethereum addresses in PHP, how do i go about generating a random Ethereum public/private key pair in PHP? thanks.
0
votes
1answer
1k views

Is there a way to read data from smart contract using PHP?

I have a smart contract. All what I need is to make a PHP script that will get some public data from smart contract using it's address. How can I do that? Maybe there is some libraries?
3
votes
1answer
2k views

Generate Ethereum address from a private key

My question was first asked on stackoverflow but due lack of privileges I couldn't move it here directly. I am trying to generate an Ethereum address based on a given private key following this "How ...
2
votes
2answers
1k views

web3 js eth.contract equivalent in PHP

var Web3 = require('web3'); var web3 = new Web3(); web3.setProvider(new web3.providers.HttpProvider("http://blahblah.com:8545")); var token = web3.eth.contract(ABI).at("x0x_contract_address") How ...
1
vote
0answers
299 views

Can't connect to RPC on php server

I am using php to connect RPC server. In localhost, everything works fine. I moved my files to host to test and I realised that $geth->Method_Name() is not working. If I print_r($geth), here is the ...
1
vote
0answers
58 views

I want to create a local exchange site how to add ethereum? [closed]

like a said I want to build an exchange site how can I add ethereum on it?
7
votes
3answers
5k views

web3 js php implementation

Is there any way to communicate with ethereum through php ? what i want is to get Smart contract details from contract address like Contract token name, decimal, abi, balance, tokens supply symbols ...
1
vote
1answer
847 views

Save hash data with KECCAK-256 then reverse the process in PHP

I am saving data hashed with keccak-256 in Solidity and I am trying read that data with PHP, but cant seem to find any good solutions. I can get PHP to read off the data but I cant arrive at the same ...
2
votes
2answers
2k views

transactions through a php website [closed]

how I use to users to send ethereum transactions through a php website?My server is Apache. Is the Ethereum JavaScript API useful to doing this? Thank you!
0
votes
2answers
381 views

PHP and wordpress

i am WordPress and php developer. i am working on the plugin development for ethereum. i does't find the sdk or api for the php or JavaScript. can you please guide me for the API documentation for the ...
5
votes
1answer
4k views

How to generate Ethereum address in PHP?

I am working on a web application where I need to generate Ethereum addresses in PHP, how do i go about generating a random Ethereum public/private key pair in PHP? thanks.
4
votes
1answer
540 views

How to send an ETH address from a webpage to a smart contract?

What's the best way to get an ETH address from a website form submission (php) passed to a smart contract in order that the smart contract can send some new minted Tokens to the ETH address collected ...
1
vote
0answers
467 views

Calling an Ethereum contract function from PHP [duplicate]

How can I call a contract function from PHP and print the return? Is there any good PHP libraries for that? thanks.
9
votes
1answer
12k views

PHP Library for Ethereum

I am looking for a PHP library to interact with Ethereum. Are there any active open source projects of PHP libraries for Ethereum available? Thanks for your help
5
votes
1answer
3k views

Accepting and sending API for Ethereum

Is there any good API for accepting and sending Ethereum like blocktrail for bitcoin ? Why is working with Ethereum so complicated?
1
vote
1answer
1k views

Find out latest block hash in Ethereum using JSON-RPC

I am developing an ethereum block explorer in PHP and have established an JSON-RPC communication with my server geth node successfully. Nevertheless, I am kind of stuck when trying to find out the ...
10
votes
2answers
1k views

How can I trigger a PHP script when a transaction is received?

My goal is to have a PHP script be invoked whenever a transaction is received by a given address. I know Javascript but this is my first sally into Node.js. I think the right approach is to run a ...