PHP code example of attus / porthu

1. Go to this page and download the library: Download attus/porthu library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

attus / porthu example snippets



use Attus\PortHu\PortHu;
use Attus\PortHu\Exception\PortHuException;

$portHu = new PortHu();
$portHu->addChannel(5);
$t = time() + 86400;
$portHu->setTimestamp($t);
try {
  $result = $portHu->getProgram();
}
catch (PortHuException $ex) {
  var_dump($ex);
}