is-connection.php 497 B

1234567891011121314
  1. <?php
  2. include_once '../vendor/autoload.php';
  3. $fullNode = new \IEXBase\TronAPI\Provider\HttpProvider('https://api.trongrid.io');
  4. $solidityNode = new \IEXBase\TronAPI\Provider\HttpProvider('https://api.trongrid.io');
  5. $eventServer = new \IEXBase\TronAPI\Provider\HttpProvider('https://api.trongrid.io');
  6. try {
  7. $tron = new \IEXBase\TronAPI\Tron($fullNode, $solidityNode, $eventServer);
  8. } catch (\IEXBase\TronAPI\Exception\TronException $e) {
  9. exit($e->getMessage());
  10. }
  11. $tron->isConnected();