[Typo3] Display User IP Address
Floyd Arguello
floyd at icommnetwork.com
Fri Nov 11 00:30:13 CET 2005
Alexander Heidl wrote:
> Floyd,
>
> For several of my domain names I have got a holding page where I display the
> domain the user has requested: http://www.startstep.com for example. This is
> done by the little TS:
>
> lib.domainname = TEXT
> lib.domainname.data = getenv:HTTP_HOST
>
> Now if you adopt this to something like:
>
> lib.ipaddress = TEXT
> lib.ipaddress.data = getenv:REMOTE_ADDR
>
> Then lib.ipaddress will contain the IP address of the user. As this is a TS
> object you can place this anywhere for FE rendering. I am using TV for
> rendering; hence this objects starts with lib and is placed in within a DIV
> tag.
>
> BR,
>
> Alex Heidl
> http://www.fulcio.co.uk
>
>
>
> -----Original Message-----
> From: typo3-english-bounces at lists.netfielders.de
> [mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of Floyd
> Arguello
> Sent: 10 November 2005 06:19
> To: typo3-english at lists.netfielders.de
> Subject: [Typo3] Display User IP Address
>
> Hi all,
>
> I'd like to display the user's IP address on a form page, and was
> wondering if anyone had any experience and could point me in the right
> direction?
>
> Thanks,
> Floyd
> _______________________________________________
> Typo3-english mailing list
> Typo3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
>
Hi Alex,
Forgive me if I sound a little daft... this is the first site I've built
with Typo3. This is what I understand:
Place these 2 lines into the template setup:
lib.ipaddress = TEXT
lib.ipaddress.data = getenv:REMOTE_ADDR
Place this on my page:
<div id="ipaddress"> </div>
This solution seems much simpler than the PHP code I had found... thanks
for that.
Floyd Arguello
More information about the TYPO3-english
mailing list