in reply to Re^2: need to post a string without user intervention
in thread need to post a string without user intervention
If you want to print the response, as html at your web server, you should add at the top print "Content-type: text/html\n\n";#!/usr/bin/perl -w use strict; use HTTP::Request::Common qw(POST); use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $req = POST 'http://www.booksforeducation.com/testbed/fred.php', [ +XML => $last, ]; my $response = $ua->request( $req )->as_string; print $resposne; # That's the output from your php script...
|
|---|