Here it is-
I have included a couple of HTTP header readers below. These are some of the most popular ones. All these do is grab the information from the (invisible) header of the incoming HTML page. You will be able to use it along with variables to redirect to desired locations. You can even use the 4th one to determine which browser they are using so you can send them to an "IE" or "Netscape" version of your site or use the appropriate CSS style sheet.
<?php
$visitor_time = date("F jS Y, h:iA");
if ($REMOTE_HOST == "") $visitor_info = "ACK No host";
else $visitor_info = $REMOTE_HOST;
if ($REMOTE_ADDR == "") $visitor_info2 = "ACK No address";
else $visitor_info2 = $REMOTE_ADDR;
if ($HTTP_REFERER == "") $visitor_info3 = "OH DEAR No referer";
else $visitor_info3 = $HTTP_REFERER;
if ($HTTP_USER_AGENT == "") $visitor_info4 = "WEIRDNESS No browser or other browser used";
else $visitor_info4 = $HTTP_USER_AGENT;
?>
Hope this helps - have fun!