How to use Gnupg with PHP in windows 2000?

From: Date: Sat, 08 Mar 2003 12:01:38 +0000
Subject: How to use Gnupg with PHP in windows 2000?
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-16209@lists.php.net to get a copy of this message
What's wrong in my codes? <? $to_email = "xxxxxx@yahoo.com"; putenv("GNUPGHOME = F:\\gnupg"); $infile = tempnam("", "pgp"); $outfile = $infile.".asc"; $fp = fopen($infile, "w"); fwrite($fp, $body); fclose($fp); $command ="f:\\gpg --output $outfile --compress-algo 1 --cipher-algo cast5 --recipient yyyyy@yahoo.com --encrypt $infile"; system($command, $result) system("del $infile"); if($result==0) { $fp = fopen($outfile, "r"); if(!$fp||filesize ($outfile)==0) { $result = -1; } else { //read the encrypted file $contents = fread ($fp, filesize ($outfile)); //delete the encrypted temp file system("del $outfile"); mail($to_email, $title, $contents, "From: $from\n"); echo "<h1>Message Sent</h1> <p>Your message was encrypted and sent. <p>Thank you."; } } if($result!=0) { echo "<h1>Error:</h1> <p>Your message could not be encrypted, so has not been sent. <p>Sorry."; } ?> _________________________________________________________ 我的驕傲(容祖兒),左鄰右里(李克勤),你最紅(Twins)... 過千首手機鈴聲 點Ring都得 http://ringtone.yahoo.com.hk

« previous php.mirrors (#16209) next »