#native_company# #native_desc#
#native_cta#

Cookie Based Entrance Page

By Michael Halvorsen
on June 22, 2002

Version: 1.0001

Type: Full Script

Category: Other

License: GNU General Public License

Description: If your site has an entrance page and you would like that entrance page to ONLY be displyed if they haven’t seen it, this is what you need.

When someone views your site, a page is called and if that someone has not visited the Entrance page,it will create a cookie on the client’s computer upon entry. If that someone has already visited your site and a cookie has been made, it will show the main page of your site. All of which can be configured. Easy to do. Only have to change 4 lines.

<?
// Visit arachnia-web.com


// Will allow you to have a entrance page only be displayed if
//    the cookie has not already been created.  Save this file 
//    as index.php.  Change commented lines to meet your needs.

// Change YOURSTRING's to something unique
setcookie("YOURSTRING", "vistedmain", time() + 3600);

$cookieinfo = $HTTP_COOKIE_VARS["YOURSTRING"];


if ($cookieinfo == "$cookieinfo") {
    include('main.php');
// change file name main.php to match your site
    exit;

} else {
    include('hendrix.html');
// change file name hendrix.html to match your site
    exit;
}

?>