PHP code example of xigen / comodo-decode-csr
1. Go to this page and download the library: Download xigen/comodo-decode-csr 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/ */
xigen / comodo-decode-csr example snippets
$ComodoDecodeCSR = new ComodoDecodeCSR();
//Get the csr from a file as a string or could just use a string
$csr = file_get_contents('certificate/test.csr');
$ComodoDecodeCSR->setCSR($csr);
$Hashes = $ComodoDecodeCSR->fetchHashes();
$Check = $ComodoDecodeCSR->checkInstalled();
var_dump($Hashes, $Check);
/*
array(2) {
'md5' =>
string(32) "98EB197EF83F7A9EB736ED7CEBD413CE"
'sha1' =>
string(40) "DA9C72B6F6BCB05772BF8543E19D1A41B0210E84"
}
bool(true)
*/