PHP code example of mike-trueh / wb-stat

1. Go to this page and download the library: Download mike-trueh/wb-stat 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/ */

    

mike-trueh / wb-stat example snippets

 php
use WbStat\WbStatSDK;
...
$date = date_create_from_format('U', time());
$wbStat = new WbStatSDK('YOUR-TOKEN');

$incomes = $wbStat->incomes($date); 
// Дату можно установить через функцию setDate() 
$incomes = $wbStat->setDate($date)->incomes(); 
 xml
<php>
    <env name="WBSTAT_TOKEN" value="fakeApiToken" force="true"/>
</php>