You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Tim Keefer <tk...@allenpress.com> on 2002/07/31 18:09:16 UTC

get_remote_host for mod_perl2

Hi All,
Any ideas for retrieving the users ip address within a mod_perl2 module? 
mod_perl1 has $r->get_remote_host. Is their something similar in mod_perl2? 
I've searched all the mod_perl2 docs on perl.apache.org and couldn't find 
anything about this.
Thanks in advance,
Tim Keefer


Re: get_remote_host for mod_perl2

Posted by Stas Bekman <st...@stason.org>.
Tim Keefer wrote:
> Hi All,
> Any ideas for retrieving the users ip address within a mod_perl2 module? 
> mod_perl1 has $r->get_remote_host. Is their something similar in 
> mod_perl2? I've searched all the mod_perl2 docs on perl.apache.org and 
> couldn't find anything about this.

in 2.0 it's:

use Apache::Connection;
$r->connection->remote_host();

I'm not sure why Doug renamed it, but I just committed a patch to the 
compat layer. will update the doc too.

p.s. Lyle is working on automatic docs extraction from httpd header 
files. once this is done the 2.0 API will appear online. Currently use 
search t/ for API usage.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com