Set a far future absolute time:
setcookie("CookieName", "CookieValue", 2147483647);
It is better to use an absolute time than calculating it relative to the present as recommended in the accepted answer.
The maximum value compatible with 32 bits systems is:
2147483647 = 2^31 = ~year 2038