Hello, I've been trying to make it so when someone visits my site it will take their IP and redirect them to their profile page, this is what i'm not finding out how to do...
<?
$visitor = $_SERVER['REMOTE_ADDR'];
if (preg_match("$_SERVER['REMOTE_ADDR'];",$visitor)) {
header('Location: http://www.yoursite.com/$_SERVER['REMOTE_ADDR'];');
} else {
header('Location: http://www.yoursite.com/register.html');
};
?>
I'm using their IP addresses for their page example http://mysite.com/THEIR IP HERE
so I need the "if" redirect to use their Ip instead of the "$_SERVER['REMOTE_ADDR'];"
I really need help on this one...
Sincerely,
FILLOST