xoops_getBaseDomain

Determine the base domain name for a URL. The primary use for this is to set the domain used for cookies to represent any subdomains.

The registrable domain is determined using the public suffix list. If the domain is not registrable, an empty string is returned. This empty string can be used in setcookie() as the domain, which restricts cookie to just the current host.

Parameters
string $url

URL or hostname to process

#
Returns
string

the registrable domain or an empty string