Standalone script
#!/usr/bin/perl use strict; use warnings; use LWP::Simple::Post qw(post); #binary file open(FH, "binaryfile"); my $Data = do{local $/; <FH>}; close(FH); my $url = 'http://localhost:8080/cgi-bin/index.pl'; my $content = post($url, $Data); print $content;
Server script
#!/usr/bin/perl use strict; use CGI; my $q = new CGI; print "\nMethod :", $ENV{REQUEST_METHOD}; print "\nContent_Length : ", $ENV{CONTENT_LENGTH}; #binary file open (FH, ">binaryoutput"); print FH $q->param() if ($q->param()); close(FH);
In the server script, i need to do several process and also i don't want to upload concept. For some concept, I want to post the data and retrive in the server look like parameters
In reply to Re^2: How to change content-length in CGI
by Anonymous Monk
in thread How to change content-length in CGI
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |