PHP code example of xqus / pgp-tools

1. Go to this page and download the library: Download xqus/pgp-tools 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/ */

    

xqus / pgp-tools example snippets



use xqus\pgpTools\Lookup;

$keys = $lookup->find('[email protected]');

foreach($keys as $key) {
  echo $key->fingerprint;
  echo $key->keylen;
  echo $key->created;
  echo $key->expires;

  /* Get UIDs */

  foreach($key->uids as $uid) {
    echo $uid->name();
    echo $uid->comment();
    echo $uid->email();
  }
}