Set cookie for visitor
If you are looking for user only comments then you could try this one ( http://codex.wordpress.org/Function_Reference/wp_set_auth_cookie). This function can be replaced via plugins. If plugins do not redefine these functions, then this will be used instead. Sets the authentication cookies based User ID. The $remember parameter increases the time that the cookie will be kept. … Read more