RE: [PHP] 1 ip address go here all others go here
| From: | Jay Blanchard | Date: | Tue, 13 Dec 2005 16:13:58 +0000 |
| Subject: | RE: [PHP] 1 ip address go here all others go here | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-227380@lists.php.net to get a copy of this message | ||
[snip]
Is there a way of sending users with a local ip address say 127.0.0.1
and 192.168.xxx.xxx to goto one page and all other visitors to goto another?
[/snip]
Yes, there is.
$_SERVER['REFERER'] will give you the referer mosy of the time. More info
from TFM can be found here;
http://us3.php.net/reserved.variables
Header can then be used to redirect
header("Location: http://www.example.com/");
/* Redirect browser */. More
info from TFM can be found here;
http://us3.php.net/header