hello,

Again I have a post question :)
In my Re: Re: Re: Re: Receiving POST yesterday I wrote a quick hack to demonstrate what I want. That worked. But today I'm trying to rewrite the script to get it a bit better and I'm working to a good and secure script. But I stumbled on a strange problem.

My new send script:
use strict; use LWP::UserAgent; my $ua = new LWP::UserAgent; $ua->agent("PlanetXML/0.1 " . $ua->agent); my $req = new HTTP::Request POST => 'http://geert.dia.pi.be/cgi-bin/xm +lreceive.cgi'; $req->content_type('text/xml'); my $content = slurp("/export/home/geert/xml/XMLS/PXMLStatusMessage.xml +"); $req->content($content); my $res = $ua->request($req); if ($res->is_success) { print $res->content; } else { print "Error\n"; } sub slurp { local $/ = undef; local *X; open X, $_[0] or die "Can't open $_[0]: $!"; my $slurp = <X>; close X or die "Can't close $_[0]: $!"; $slurp; }

Yesterdayfor fast testing purposes I used:
$content=<<END; <xml> </xml> END
To get the contents of my xml.

The receiving script in my former post : http://www.perlmonks.org/index.pl?node_id=97650&lastnode_id=6364 received keywords as param, so I could get the xml as value. But when using my new send script, it doesn't send the param keywords?? But a part of my xml as param?



--
My opinions may have changed,
but not the fact that I am right


In reply to Yet another POST question by toadi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.