Hi,
You can find the user's IP Address using the one of the following:
<?php
$ip = getenv('REMOTE_ADDR');
$ip = $_SERVER['REMOTE_ADDR'];
?>
Then you can do you comparison...
Then, to do the redirect, you can use:
header("location: http://www.mysite.com/page2");
See Header for more information.