Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 1.37 KB

File metadata and controls

53 lines (41 loc) · 1.37 KB

IOTA.php

Discord Twitter
Apache-2.0 license IOTA >PHP 8

Examples (Basics)

Include and create a client

<?php
  // include iota lib
  require_once("../iota.php");
  // create client
  $client = new iota('https://api.lb-0.testnet.chrysalis2.com');

Basics

Each methode with "echo" will return a json string

  echo $client->info();

Each method returns an object to get the direct parameter

  $info = $client->info();

  echo $info->name;

Short example

  echo ($client->info())->name;

To work with an Array, you can user (array)

  $array = (array)$client->info();

Additional Examples

Please find other examples in the examples folder.


<- Back to Overview