faqts : Computers : Programming : Languages : PHP : Common Problems : Encryption

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

Entry

I wish to call a /usr/local/bin/pgp program and then put the output into a variable, which way best?

Oct 8th, 2006 14:49
Matthew Wilkinson, TOm h, http://php.net/exec


You will want to use one of the external program execution calls such as
system or exec. These will give you the entire output of the program
that was run, but please be cautioned that the PHP script will halt
until the program has finished executing, and will hang forever if a
prompt is required such as "OK To Continue (y/n)?". Please make sure
that you check any user input that goes to these programs.