dmsparts has asked for the wisdom of the Perl Monks concerning the following question:
Hope this helpssub smsreply{ $smsreply = 'd:\inetpub\wwwroot\cgi-bin\classads\test'; { local ($buffer, @pairs, $pair, $name, $value, %FORM)}; # Read in text $ENV{'REQUEST_METHOD'} =~ tr/a-z/A-Z/; if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CON +TENT_LENGTH'}); } else { $buffer = $ENV{'QUERY_STRING'}; } # Split information into name/value pairs @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value = +~ tr/+/ /; $postFields{ "$name" } = $value; #populatePostFields; $from = $postFields{ "from" }; $msg = $postFields{ "text" }; $msgid = $postFields{ "msgid" }; open (SMSREPLY, ">>$smsreply/abc.txt"); print SMSREPLY "\n $name"; print SMSREPLY "\n $value"; close SMSREPLY; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: HTTP 200 Status
by moritz (Cardinal) on Sep 02, 2008 at 13:44 UTC | |
Re: HTTP 200 Status
by Fletch (Bishop) on Sep 02, 2008 at 13:36 UTC | |
Re: HTTP 200 Status
by jettero (Monsignor) on Sep 02, 2008 at 13:36 UTC | |
Re: HTTP 200 Status
by Anonymous Monk on Sep 02, 2008 at 14:06 UTC | |
by dmsparts (Sexton) on Sep 02, 2008 at 14:30 UTC | |
by converter (Priest) on Sep 02, 2008 at 16:14 UTC | |
Re: HTTP 200 Status
by Sagacity (Monk) on Sep 02, 2008 at 20:57 UTC |