1. Go to this page and download the library: Download dfridrich/czech-data-box 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/ */
efr\CzechDataBox\DataBox;
$dataBox = new DataBox();
$dataBox->loginWithUsernameAndPassword("login", "heslo", true); // Pro ostrou verzi
$dataBox->loginWithUsernameAndPassword("login", "heslo", false); // Pro verzi s testovacím přístupem
$dataBox->loginWithCertificateAndPassword("certifikat.cer"); // Nebo pouzijte prihlaseni certifikatem
/** @var \Defr\CzechDataBox\DataBoxSimpleApi $simpleApi */
$simpleApi = $dataBox->getSimpleApi();
$simpleApi->getDataBoxInfo(); // vrací Defr\CzechDataBox\Api\tDbOwnerInfo
$simpleApi->getUserInfo(); // Vrací Defr\CzechDataBox\Api\tDbUserInfo;