I need to append my public key (which is in a variable) in pubring of .gnupg using the system call in PHP. What system call is available for this?
$gpg = system('gpg --recipient userid --output outfile.asc --armor --encrypt hello.txt', $retvalue);//calling gpg encrypt command using system call
echo '
Output: ' . $gpg . '
Return value: ' . $retvalue;
How can I pass my public key to this GPG encryption command?