PHP has a function setcookie since version 3.0, but this function is too low-level for simple usage.
Function ae_put_cookie provided, sets cookie for current domain without specifying long arguments lists. Just three arguments: 'name', 'value', session cookie flag/number of days/forever cookie flag