CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Other Programming Languages: PHP:
How to identify the content of LWP request in PHP?

 



ahfeii
Novice

Jun 11, 2012, 6:01 PM

Post #1 of 1 (35369 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:

Code
my $browser = LWP::UserAgent->new; 
my $response = $browser->post($return_rul,Content => $XMLDocument);


when i print Dumper($response); i receive the following:


Code
$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:

Code
 '_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!

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives