1. Go to this page and download the library: Download mahdy/wpnonce 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/ */
mahdy / wpnonce example snippets
$nonce = new \WpNonce\Nonce("Xaction");
$nonce = new \WpNonce\Nonce();
$nonce->setAction("Xaction");
$nonce->setName("theNewName");
/*if you didn't set the action in constructor, you have to use setter before to use this function*/
$nonce_string = $nonce->generateNonce();
/*use the object directly */
$str = "the following object will return as Nonce string ".$nonce;