Can anyone tell me how to redirect users based on there IP
I want to redirect users to page2.php if there IP begins with 195.10 or 205.18
Other wise forward them to page1.php
Any ideas?
Stuart
Could try:
if (preg_match('/^((195\.10)|(205\.18))\.\d\.\d$/', $_SERVER['REMOTE_ADDR'])) header("Location: page2.php"); else header("Location: page1.php");