Reload parent page from iframe

<html>
    <head>
        <script type="text/javascript">
        
            window.onload = function()
            {
                // Reload the parent window
                window.top.location.href = window.top.location.href;
            }
            
        </script>
    </head>
</html>

Set a cookie to never expire

There is no way to set a cookie to not expire; This is not a PHP limitation, it’s just not part of the specification for cookies (http://www.faqs.org/rfcs/rfc2965.html).

Your best bet is to use a date far in the future. For example, to set a cookie that expires in ten years:

setcookie(
  "CookieName",
  "CookieValue",
  time() + (10 * 365 * 24 * 60 * 60)
);

Note that if you set a date past 2038 in PHP, the number will wrap around and you’ll get an instant-expire cookie