Hello Monks
So here's the story... I have a Flash program running on a server that sits and listens on a port. In order to do this
you need to have a "Flash Policy File" which I have and does work when sending XML Data from a C# program another employee
wrote. So I run the "flashpolicyd.pl" file and pass it my XML "Policy File" which is currently set to receive requests from
ANY host. So that part at least I know works.
So now I'm trying to send some other XML Data to the server using a Perl Script. From the Perl side of things I don't get any
errors. But when I look over at the Server that is listening for a Socket connection, I can see the following in the Windows
CMD Prompt for the output from the "flashpolicyd.pl" script:
(*I can see my PC's IP Address)
"Connection from 192.168.x.xxx:56321
Unrecognized request: <FRAME><MESSAGE VAR="TestVariable" TEXT="ValueOFVariable" /></FRAME>"
So for some reason the XML data I'm sending is invalid according to the Perl script "flashpolicyd.pl"...
My Perl script which sends the data to the server from my PC:
#!/usr/bin/perl
use strict;
use LWP::Socket;
print "In Perl Script... Sending message now\n";
my $socket = new LWP::Socket;
$socket->connect('192.168.5.26', 843); # echo
my $quote = "<FRAME><MESSAGE VAR=\"TestVariable\" TEXT=\"ValueOFVa
+irable\"/></FRAME>\0";
$socket->write("$quote\n");
$socket = undef; # close
I got the code from this link below at search.cpan.org:
"http://search.cpan.org/~gaas/LWP-attic-1.00/lib/LWP/Socket.pm"
If you need to see the "flashpolicyd.pl" file too just let me know, I just got that Perl script from the Web somewhere,
and it does work for another program written in C#, which sends XML Data in pretty much the exact same format.
Anyone have any clue what I could be doing wrong here..? Is there just something I'm missing?
Any thoughts/suggestions would be VERY much appreciated.
Thanks in Advance,
Matt
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.