Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
examples.inc.php
Go to the documentation of this file.
1 <?php
2 
3 require_once __DIR__ . '/../vendor/autoload.php';
4 
8 if (!IS_PUBLIC) {
9  header("HTTP/1.1 401 Unauthorized");
10  die('ACCESS DENIED');
11 }
12 
13 function printTable($rows) {
14  echo "<table>";
15  foreach ($rows as $row){
16  echo "<tr style='border: 1px solid lightgray'>";
17  echo "<td style='border: 1px solid lightgray'>" . $row[0] . "</td>";
18  echo "<td style='border: 1px solid lightgray'>" . $row[1] . "</td>";
19  echo "</tr>";
20  }
21  echo "</table>";
22 }
if(!IS_PUBLIC) printTable($rows)
const IS_PUBLIC