PHP code example of toolstud-io / nowtricity

1. Go to this page and download the library: Download toolstud-io/nowtricity 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/ */

    

toolstud-io / nowtricity example snippets

 php
$obj = new ToolstudIo\Nowtricity\Nowtricity($apiKey);
$countries = $obj->countries();
$current = $obj->current('belgium');
$last24 = $obj->last24('belgium');
$year = $obj->year('belgium', '2022');