custom COOKIE on custom page

If all you are doing is setting a cookie on a page then why the complexity?
Check this out for a simple answer http://www.w3schools.com/php/func_http_setcookie.asp

My only thought is that you are then trying to redirect them back to WordPress and if so you may wish to check this Setting custom cookies in WordPress

I’d say your error “missing function 2” is coming from incorrect syntax for time.