Saves visitor information as a cookie so it can be reused.
$values: An array of key/value pairs to be saved into a cookie.
function user_cookie_save(array $values) {
foreach ($values as $field => $value) {
// Set cookie for 365 days.
setrawcookie('Drupal.visitor.' . $field, rawurlencode($value), REQUEST_TIME + 31536000, '/');
}
}