Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP, GPG email encryption

Status
Not open for further replies.

Shilohcity

Technical User
Jul 12, 2000
136
GB
Hi there

I am trying to encrypt and send some information from a php page as an email. I know this can be done using gpg but I am not having much luck getting it to work. I have setup a key for myself on the webserver and am trying to use the following code:

<?php
$gpg = '/usr/bin/gpg';
$recipient = '1024D/5F38D79B 2002-10-31 Justin Hewitt (Justins Key) <justin@dfodesign.co.nz>';
$secret_file = 'test_table.txt';

echo shell_exec(&quot;$gpg -e -r $recipient $secret_file&quot;);
?>

to encrypt a file. Nothing is happening though. No errors but no encypted file either.

Does anybody have any advice or links to an explanation of how this process should work.

As always all thoughts, comments and suggestions are gratefully received.

Justin. X-) &quot;Creativity is the ability to introduce order into the randomness of nature.&quot; Eric Hoffer

Visit me at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top