installation GPG on LINUX webFTP

manga4life at manga4life at
Sat Feb 21 15:46:48 CET 2004


i have a question, i install gpg on windows xp, that s work fine.

i have a project, i want make a web appliaction who crypt text write in 
a form, and send it by email to my mailbox. Naturelly, the mail come 
a friend create a script : for crypting the form
i submit the script for explain my project.
  //create short variable names
  $from = $HTTP_POST_VARS['from'];
  $title = $HTTP_POST_VARS['title'];
  $body = $HTTP_POST_VARS['body'];

  $to_email = 'abc at';

  // Tell gpg where to find the key ring
  // On this system, user nobody's home directory is /tmp/
  //create a unique file name 
  $infile = tempnam('', 'pgp');  
  $outfile = $infile.'.asc';

  //write the user's text to the file
  $fp = fopen($infile, 'w');
  fwrite($fp, $body);

  //set up our command
  $command =  "cgi/gpg -a \\
               --recipient 'abc <abc at>' \\
               --encrypt -o $outfile $infile";

  // execute our gpg command 
  system($command, $result);

  //delete the unencrypted temp file

    $fp = fopen($outfile, 'r');    
    if(!$fp||filesize ($outfile)==0)
      $result = -1;
      //read the encrypted file
      $contents = fread ($fp, filesize ($outfile));
      //delete the encrypted temp file 

      mail($to_email, $title, $contents, "From: $from\n");
      echo '<h1>Message Sent</h1>
            <p>Your message was encrypted and sent.</p>
            <p>Thank you.</p>';

    echo '<h1>Error:</h1>
          <p>Your message could not be encrypted, so has not been 

My problem is how install module GPG on the FTPi have an FTP 
account, accepting PHP, i know server is linux machine.
How can install GPG on a linux, i don't have linux to install files and 
upload them.

help me please
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20040221/42da2442/attachment.htm

More information about the Gnupg-users mailing list