When I use this code for encrypting files I get feedback from PGP that prints in my php template and I would like to prevent the PGP feedback from printing. Open to suggestions.
class PGP{
function pgp_make($input_file){
global $CFG;
putenv("PGPPATH=$CFG->pgp_path");
$tmpToken = md5(uniqid(rand()));
$plainTxt = "$CFG->pgp_data_center" . "$tmpToken" . "data";
$crypted = "$CFG->pgp_data_center" . "$tmpToken" . "pgpdata" . ".asc";
$fp = fopen($plainTxt, "w+");
fputs($fp, $input_file);
fclose($fp);
system("$CFG->pgp_app -o $crypted -ta $plainTxt");
$fd = fopen($crypted, "r");
$mail_cont = fread($fd, filesize($crypted));
fclose($fd);
unlink($plainTxt);
unlink($crypted);
mail($CFG->email_recipient, $CFG->email_subject, $mail_cont, $CFG->mailheaders);
}