You don't need to hack LWP at all: the information is available to you via the header() method on the response object.
use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $res = $ua->get('http://www.booble.com/'); print $res->header('client-peer');
However, I don't see the availability of the client-peer header documented in the HTTP::Response or HTTP::Headers POD pages, so this may not work in previous or future LWP releases.
(Works for me with LWP::UserAgent 2.033, HTTP::Message 1.56 and HTTP::Headers 1.62.)
--k.
In reply to Re: LWP and Remote IP
by Kanji
in thread LWP and Remote IP
by davemcgi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |