[snip] In short, it cannot really be trusted. notice the last 7 words !!!! [/snip] Any external data introduced into a script can't be trusted... including $_GET and $_POST That doesn't mean they shouldn't be used... just used carefully Also if you want to use the IP address maybe REMOTE_ADDRESS would be favourite -----Original Message----- From: Dave Carrera [mailto:dave@xxxxxxxxxxxxxx] Sent: 13 December 2005 16:23 To: Jay Blanchard Cc: php-general@xxxxxxxxxxxxx Subject: Re: 1 ip address go here all others go here Jay Blanchard wrote: >[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 > > > snip from TFM 'HTTP_REFERER' The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted. notice the last 7 words !!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __________ NOD32 1.1320 (20051212) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php