Re: redirect to a page the fist time a site is accessed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don wrote:
Hi,

I have some code in my index.php file that check the user agent and redirects to a warning page if IE 6 or less is encountered.

1. I'm using a framework and so calls to all pages go through index.php
2. The code that checks for IE 6 or less and redirects is in index.php

I know how to redirect the users but what I want to do is redirect a user ONLY the first time the web site is accessed regardless of what page they first access. I would like to minimize overhead (no database). Can this be done?

# first time visitor?
if (!isset(cookie)) {
 set cookie
 redirect
 exit;
}

# they've been here before, continue as normal.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux