Again. Who mentioned CGI. It isn't necessary in CGI. I know how LWP works to post something. I know that. I just told earlier I want to receive the XML stream posted to my https server. Can it be done just to receive the stream. I don't want that file upload thing 'cos that isn't what I need.
Let me give a rough example.Watch out! insecure script: no use strict and -wT. Only used do demonstrate my intentions...
The sending script:
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$ua->agent("PlanetXML/0.1 " . $ua->agent);
my $req = new HTTP::Request POST => 'http://www.test.be/cgi-bin/xmlrec
+eive.cgi';
$req->content_type('text/xml');
$content=<<END;
<request>
<header>
<from>Sender</from>
<to>Receiver</to>
</header>
<body>
lots of stuff
</body>
</request>
END
$req->content($content);
my $res = $ua->request($req);
if ($res->is_success) {
print $res->content;
} else {
print "Error\n";
}
For the receiver: Maybe it's not ok what I do but it works :)
use CGI;
$q = new CGI;
print $q->header;
@name = $q->param('keywords');
print map("$_\n",@name);
Hope this will show better what I mean!
-- My opinions may have changed,
but not the fact that I am right
|