You are here: Re: [PHP] Re: php script running as a cgi « PHP « IT news, forums, messages
Re: [PHP] Re: php script running as a cgi

Posted by "zedleon" on 10/01/73 11:37

I am getting a parse error, unexpected T_VARIABLE

you would think this would be easy.....

zed

"John Nichel" <john@kegworks.com> wrote in message
news:43CBE28B.2080908@kegworks.com...
> zedleon wrote:
> > here is the php code i am using as a cgi in the cgi-bin
> > This form executes fine, just doesn't get the variables for the form.
> >
> > simple test form at:
> > http://www.passeycorp.com/gnupg.php
> >
> > thanks for the feedback.
> >
> > zed
> > -----------------------------------------------------------------------
> >
> > #!/usr/local/bin/php -q
> >
> > <?
>
> What is the output if you 'print_r ( $_POST )' here?
>
> > $msg = "Sender's Full Name:\t$_POST[sender_name]\n";
> >
> > $msg .= "Sender's E-Mail:\t$_POST[sender_email]\n";
> > $msg .= "Secret Message?\t$_POST[sender_msg]\n\n";
> >
> > putenv("GNUPGHOME=/home/account_name/.gnupg");
> >
> > $username = "passey";
> >
> > $tmpToken = md5(uniqid(rand()));
> >
> > $plainTxt = "/home/account_name/temp/input/" . "$tmpToken" . "data";
> > $crypted = "/home/account_name/output/" . "gpgdata";
> >
> > $fp = fopen($plainTxt, "w+");
> > fputs($fp, $msg);
> > fclose($fp);
> >
> > system("/usr/bin/gpg --encrypt -ao $crypted -r 'ted passey'
$plainTxt");
> >
> > $fd = fopen($crypted, "r");
> > $mail_cont = fread($fd, filesize($crypted));
> > fclose($fd);
> >
> > unlink($plainTxt);
> > unlink($crypted);
> >
> > $recipient = "your@email.com";
> > $subject = "Stupid Secret Message";
> >
> > $mailheaders = "From: www.yourwebsite.com\n";
> > $mailheaders .= "Reply-To: $sender_email\n\n";
> >
> > mail("$recipient", "$subject", $mail_cont, $mailheaders);
> >
> > echo "
> > <H1 align=center>Thank You, $sender_name</h1>
> > <p align=center>Your secret message has been sent.</p>";
> >
> > ?>
>
>
> --
> John C. Nichel IV
> Programmer/System Admin (άberGeek)
> Dot Com Holdings of Buffalo
> 716.856.9675
> jnichel@dotcomholdingsofbuffalo.com

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация