Cookie Based Entrance Page - If your site has an entrance page and you would like that entrance page to ONLY be displayed if a visitor has not seen it, this is what you need. When someone views your website, a page is called and if the visitor has not visited the entrance page, it will create a cookie on the visitors computer upon page load. If the visitor has already visited your site and the cookie has been created, it will show the main page of your site instead.
<? // #1 Change the cookie name of 'SOMETHING' to your name if(empty($_COOKIE['SOMETHING'])){ // #2 If you renamed 'SOMETHING' cookie, change name below too! setcookie("SOMETHING","vistedmain",time()+60*60*24*30); // #3 This is the main content page path below include("main-content.html"); }else{ // #4 Change the HTML page name for special entrance message page below include("special-entrance-message.html"); } ?>