N
N
Nikita karpov2019-10-19 14:28:10
PHP
Nikita karpov, 2019-10-19 14:28:10

Displaying the balance of Ethereum smart contract on the site when entering id?

Good day to all ! The essence of the question is - how can I display on the site how much money was invested in a smart contract (ETH)? You can just give a link to the normal documentation in Russian where everything is clear, I implement everything in PHP!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrew Nodermann, 2019-10-19
@Lucian

Hi
https://ethplorer.io/address/0xb8c77482e45f1f44de1...
Total In is what you need
API: https://github.com/EverexIO/Ethplorer/wiki/Ethplor...
Translator https://translate. yandex.ru/

N
Nikita karpov, 2019-10-19
@nikwebzer0

How should I compile this to get the code normal, I'm green in the API!
here is what i wrote

<?php
$id = $_POST['id'];
// Создаем поток
$opts = array(
  'http'=>array(
    'method'=>"GET",
    'header'=>"Accept-language: en\r\n" .
              "Cookie: foo=bar\r\n"
  )
);
 
$context = stream_context_create($opts);
 
// Открываем файл с помощью установленных выше HTTP-заголовков
$file = file_get_contents(' http://api.ethplorer.io/getAddressInfo/0xAbbc9BD37912762543BF1cae18bB7FfC25f34e36', false, $context);
?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question