1. Go to this page and download the library: Download lin07ux/net-court 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/ */
lin07ux / net-court example snippets
use NetCourt\Business;
use NetCourt\NotaryClient;
use NetCourt\Identity\Person;
try {
$customer = new Person(['certName' => 'Lin07ux', 'certNo' => '123456789012345678']);
$business = new Business(Business::COPYRIGHT, Business::COPYRIGHT_TEXT);
$notaryClient = new NotaryClient('accountId', 'privateKeyValue');
$response = $notaryClient->createNotaryToken($customer, $business);
$token = $response->getResponseData();
} catch (\Exception $e) {
echo $e->getMessage();
}
use NetCourt\Business;
use NetCourt\NotaryClient;
use NetCourt\Identity\Person;
try {
$customer = new Person(['certName' => 'Lin07ux', 'certNo' => '123456789012345678']);
$business = new Business(Business::COPYRIGHT, Business::COPYRIGHT_TEXT);
$notaryClient = new NotaryClient('accountId', 'privateKeyValue');
// Get the notary response
$response = $notaryClient->createNotaryCert('token', 'right notary', 'something to notary');
// Get notary hash
$hash = $response->getResponseData();
// Save the cert file
$response->downloadCert('path/to/store/cert/file', $hash.'.pdf');
} catch (\Exception $e) {
echo $e->getMessage();
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.