Skip to content

Kirby 3.9.8

$visitor->ip()

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

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

Parameters

Name Type Default
$ip string|null null

Return type

Kirby\Http\Visitor|string|null

This method does not modify the existing $visitor object but returns a new object with the changes applied. Learn more →

Parent class

Kirby\Http\Visitor