[PHP] Splitting Header and Body of an Email?
Hello List, I'm trying aroung to split the header and the body of an email but can't get it to work. First I read in the email: $fp = fopen(php://stdin,r); $count = 0; while (!feof($fp)) { $data = fgets($fp,4096); $data = chop($data); $count = $count + 1; $content[] = $data; } fclose($fp); and then for ($x=0; $x = $count; $x++) { $sent_data .= $content[$x]\n; } Then I tried stuff like $mail_split = explode(\r\n\r\n,$sent_data); How would it work? Thanks a lot, Juergen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PGP -- PHP
Hello Everybody, we have a problem to implement a PGP-function into a PHP-Script. PHP 4.0.6 as CGI, Apache 1.3.11, FeeBSD 4.2 a) PGP from the command line works: % pgps -ato test.sig test.txt -z passphrase b) Calling a little PHP Script $kommando = /usr/local/bin/pgps -ato test.sig test.txt -z passphrase; exec($kommando,$antwort); to do so, also everything works fine: % virtual /usr/local/bin/php /etc/test-pgp.php Creating output file test.sig X-Powered-By: PHP/4.0.6 Content-type: text/html c) But when we use this very same PHP-code within a script, and call this script through the web, it's not working anymore and the error_log says Cannot open configuration file pgp.cfg Cannot open secret keyring secring.skr Cannot open public keyring pubring.pkr Why is that and can this problem be solved ? Thank you very much. Juergen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Signing Files with PGP
Hello List, I try to setup a script which automatically signs a file with PGP. With the system command this looks like that: % /usr/local/bin/pgps -u Juergen -ato test1.sig ~/test1.txt A private key is required to make a signature. Need a pass phrase to decrypt private key: 1024 bits, Key ID F593ED45, Created 2001-12-14 Juergen Mueller [EMAIL PROTECTED] Enter pass phrase: Pass phrase is good. Creating output file test1.sig % Now the thing is how can I implement the pass phrase into PHP so that the command is being done? When I use something like $command=/usr/local/bin/pgps -u Juergen -ato test1.sig ~/test1.txt; exec($command,$answer); obviously nothing is happening cause the pass phrase was not given. Thanks. Juergen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Email-based PHP-Script
Hello List, I'm currently trying to setup a script which is processing incomming emails. So I setup PHP as CGI and did configurate the email like robot |/path/to/the/script.php The little testscript I tried looks like that: ? $fp = fopen(php://stdin,r); while (!feof($fp)) { $BUFFER = fgets($fp); $INPUT .= $BUFFER; } mail ([EMAIL PROTECTED], Test, $INPUT, From: [EMAIL PROTECTED]); fclose($fp); ? The error which I get is /path/to/the/script.php: cannot open ?: no such file 554 5.3.0 unknown mailer error 2 Does anybody have some PHP code which would work to readout incomming emails or knows that's wrong with my little script? Thanks a lot. Juergen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Email-based PHP-Script
Hello, does anybody know of any documentation how to write scripts that do interact with emails (Majordomo-like), i.e. when an email comes to [EMAIL PROTECTED] that a script is starting which reads the email and completes tasks which are defined within the email? We are using PHP4, Apache and Sendmail. Thanks a lot. Juergen -- pro.vider.de Internetagentur GmbH Juergen Mueller Clichystr. 6 89518 Heidenheim Tel.: 07321 48 08 -72 Fax: -73 --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Dnsquery
Hello, I've tried to execute the system function dnsquery, which works fine from a shell: % dnsquery -h domain.net ;; -HEADER- opcode: QUERY, status: NOERROR, id: 61611 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2 ;; domain.net, type = ANY, class = IN domain.net. 2D IN NSNS2.domain.net. domain.net. 2D IN NSNS1.domain.net. domain.net. 2D IN NSNS2.domain.net. domain.net. 2D IN NSNS1.domain.net. NS2.domain.net. 2D IN A 198.182.225.2 NS1.domain.net. 2D IN A 204.107.140.2 but not with PHP-functions, e.g. system(dnsquery -h domain.net); exec(dnsquery -h domain.net); There is no output at all. I'm using FreeBSD 4.2 Server, Apache 1.3.11, PHP 4.04 Does anyone have an idea how I can get this work? Thanks very much. Juergen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]