2

I am using bitcoin block chain API, it is possible to get amount sent in a transaction id and the addresses it was sent to. My problem is getting the RELATED ADDRESSES to the address that sent the payment.. The only fact is that I want to be able to validate who sent the money and who it was sent to.. eg. my site involve users sending bitcoin to other users and submitting transaction ID. Each user register and input their wallet address. if User A sends to USer B and submits transaction ID, I want to be able to find out if the transaction is coming from the Sender User and is going to the Receiver Address. Validating for the receiver address is simple with my lines of code:

$requesturl='https://blockchain.info/tx-index/'.$comment.'? format=json';
$ch=curl_init($requesturl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$cexecute=curl_exec($ch);
curl_close($ch);
$result = json_decode($cexecute,true);
for($i=0; $i<count($result['out']); $i++) {
$result['out'][$i]["addr"];
}

I can get the receiver addresses from the loop above and validate, and if want to get the sending addresses it is also possible with:

for($i=0; $i<count($result['inputs']); $i++) {
// the addr is in the input
}   

Now my problem is if the wallet Address the User A submitted on our website is not in the sending address list, how do I know his address is there in the list.?

  • Do you really care who pays for a bill, or do you care what bill was paid for? To do the latter, the usual suggestion is to create a new receive address for each bill you want to see paid. To do the former, use something other than Bitcoin, as sender at best are pseudonymous anyway. – Pieter Wuille Feb 18 '17 at 19:20
  • I care who pay for a bill, its Ponzi scheme app – Emelda Chisom Agbo Feb 19 '17 at 11:23

Your Answer

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

Browse other questions tagged or ask your own question.