Re: Oracle Portal: Get visitor IP Address

From: Robert A.M. van Lopik <lopik_at_mail.telepac.pt>
Date: Tue, 6 Apr 2004 21:43:57 +0100
Message-ID: <c4v4s8$2k213s$1_at_ID-191217.news.uni-berlin.de>


"Bricklen" <bricklen-rem_at_yahoo.comz> wrote in message news:XgDcc.7592$Sh4.2300_at_edtnps84...
> Tiago Rocha wrote:
>
> > Hi!
> >
> > I have developed a nice portal for a health insurance company and now
big boss wants to record the
> > IP of the people who are visiting the website, he wants to do more or
less what those counters do
> > (the one I remember is thecounter.com, but there are others.), so he can
decide where he should
> > concentrate on advertising...
> >
> > I searched at asktom.oracle.com and found some examples and I came to
this:
> >
> > Insert into the_log_table ( ip#, dt_visita )
> > Select sys_context( 'userenv', 'ip_address' ),
> > SysDate
> > from dual ;
> >
> > As you see, I'm using sys_context, but it gets the IP of the machine
which is conected to the
> > database, and it's always the internal IP of the web server. 192.*****
This code is right at the
> > main "portlet", in a way that it's impossible to have access to the
website without going through
> > that insert.
> >
> > Is there any way, any package, something that I can use to get the IP
address of the visitor of the
> > page?
> >
> > portal version is 3.0.9.8.5 (latest patch level for portal v1), DB is
8.1.7.4 and Apache is under
> > SuSe 7.3
> >
> > Thanks in Advance and forgive my bad english!
> >
>
> If you can use perl or javascript, you could try
> perl: $ENV{'REMOTE_ADDR'}
> or javascript: http://javascript.internet.com/user-details/ip.html
>
> Not sure about pl/sql though.

[Quoted] In pl/sql it is something like:

[Quoted] ip := owa_util.get_cgi_env('REMOTE_ADDR');

hth
[Quoted] rob van lopik Received on Tue Apr 06 2004 - 22:43:57 CEST

Original text of this message