Can PHP create cookies with a host different from the current page?

Yes, PHP can create cookies with a host different from the current page by setting the domain parameter in the setcookie() function to the desired host. This allows you to share cookies across multiple subdomains or domains within the same parent domain.

setcookie('cookie_name', 'cookie_value', time() + 3600, '/', 'example.com');