Skip to content

Kirby 5.0.4

$visitor->ip()

Sets the ip address if provided or returns the ip of the current visitor otherwise

$visitor->ip(string|null $ip = null): Kirby\Http\Visitor|string|null

Parameters

Name Type Default
$ip stringornull null

Return types

Kirby\Http\Visitororstringornull

This method modifies the existing $visitor object it is applied to and returns it again.

Parent class

Kirby\Http\Visitor