1. Go to this page and download the library: Download nais-standard/sdk 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/ */
nais-standard / sdk example snippets
ais\Resolver;
$r = (new Resolver())->resolve('weatheragent.nais.id');
if ($r['signature']['verified']) {
echo $r['card']['mcp'];
// https://weatheragent.nais.id/mcp
}
echo $r['dns']['parsed']['k'];
// ed25519:oc5a92N1h1Vg9PlnM8CrB0MAw3mMddFhZTrVuMkzceQ
$summary = (new Resolver())->validate('weatheragent.nais.id');
var_dump($summary);