[Typo3] marks to display user IP Address

Bernhard Kraft kraftb at kraftb.at
Sat Nov 26 12:29:01 CET 2005


JoH wrote:

> marks.IPADDRESS = TEXT
> marks.IPADDRESS.data = getenv:REMOTE_ADDR

You can either do it as Joh stated but with the line:

marks.IPADDRESS.insertData = 1

you could also try:

marks.IPADDRESS.data = getIndpEnv : REMOTE_ADDR

but also with the insertData statement.

If you want to use the value in a string you can do something like:


marks.IPADDRESS.dataWrap = Your IP-Address is: {getenv : REMOTE_ADDR}

you will also need the insertData statement here.


As a last resort you could also get it like :

marks.IPADDRESS.data = global : _SERVER | REMOTE_ADDR

which retrieves the value directly from the $GLOBALS array.



greets,
Bernhard



More information about the TYPO3-english mailing list