script to delete a GnuPG Secret key
Hello,
I written a simple php script to delete GnupG secret keys , however I receive this error ;
gpg: cannot open /dev/tty
If I add --no-tty I receive this error ,
gpg: Sorry, no terminal at all requested - can't get input
Any idea ?
Below there is the php script .
Thank you
<?
function getDELETEPRIVATE()
{
ob_start();
$command = "/usr/bin/gpg --no-secmem-warning --home /home/test/.gnupg --yes --delete-secret-key 'B209E218'";
passthru($command);
echo"<pre>";
$lookup = ob_get_contents();
ob_end_clean();
return $lookup;
}
$delete = getDELETEPRIVATE();
echo "=========================================</BR>";
echo "<pre>$delete</pre>";
?>