I need a script in PHP that logs the user's IP visiting my site and in case the same user visits the same domain within a specified period of time he is to be redirected to a different page. I should also be able to add safe IPs into an array that this script will consider safe every time. The script needs to be well written and documented for future modifications.
Thanks.