
ahfeii
Novice
Jun 11, 2012, 6:01 PM
Post #1 of 1
(58777 views)
|
How to identify the content of LWP request in PHP?
|
Can't Post
|
|
Dear Sir/Madam, I am using LWP::UserAgent to post the content to my client:
my $browser = LWP::UserAgent->new; my $response = $browser->post($return_rul,Content => $XMLDocument); when i print Dumper($response); i receive the following:
$VAR1 = bless( { '_protocol' => 'HTTP/1.1', '_content' => '', '_rc' => '200', '_headers' => bless( { 'client-date' => 'Tue, 12 Jun 2012 00:51:38 GMT', 'content-type' => 'text/html; charset=UTF-8', 'connection' => 'close', 'x-powered-by' => 'PHP/5.3.4', 'client-response-num' => 1, 'date' => 'Tue, 12 Jun 2012 00:51:38 GMT', 'client-peer' => '127.0.0.1:80', 'content-length' => '0', 'server' => 'Apache/2.2.17 (Fedora)' }, 'HTTP::Headers' ), '_msg' => 'OK', '_request' => bless( { '_content' => '<Relation> <Family> <Father Age="51">Yoga</Father> <Mother Age="48">Yogi</Mother> </Family> </Relation>', '_uri' => bless( do{\(my $o = 'http://localhost/receive.php')}, 'URI::http' ), '_headers' => bless( { 'user-agent' => 'libwww-perl/5.837', 'content-type' => 'application/x-www-form-urlencoded', 'content-length' => 174 }, 'HTTP::Headers' ), '_method' => 'POST', '_uri_canonical' => $VAR1->{'_request'}{'_uri'} }, 'HTTP::Request' ) }, 'HTTP::Response' ); I wonder how does my client who is using PHP as his programming identify the following content:
'_request' => bless( { '_content' => '<Relation> <Family> <Father Age="51">Yoga</Father> <Mother Age="48">Yogi</Mother> </Family> </Relation>', He tries $_POST but couldn't help. Any idea will be very much appreciated!
|