PHP Classes

File: addbloco.php

Recommend this page to a friend!
  Classes of Rodrigo Faustino   Blockchain PHP Script   addbloco.php   Download  
File: addbloco.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Blockchain PHP Script
Examples to show how to manipulate a blockchain
Author: By
Last change:
Date: 10 months ago
Size: 315 bytes
 

Contents

Class file image Download
<?php
require 'blockchain.php';

// genesis block
if($_POST){
   
$nome=$_POST['nome'];
   
$email=$_POST['email'];
   
$comment=$_POST['comment'];
   
$valores=$nome.'|'.$email.'|'.$comment;
// add additional blocks
if (!$res = addblock('blockchain.dat',strtotime("now").'|'.$valores)) exit("Got error: ".$res."\n");
}

       
?>