$var = $_COOKIE['cookie.name.with.dots'];
The reason for all this faffing is that terrible setting called Register Globals, which takes all $_POST, $_GET, $_COOKIE vars and sets them to real variable names. For example…
Would be accessible with
when register globals is turned on. It is a massive security issue and should be turned off at all times.
Register globals means that all cookie, post, get etc variables must meet php variable naming guidelines, which don’t include dots.
So there you go. Turn register globals off and only use underscores to separate words in cookie names.