I'm using preg_match to match a referring url AND and an IP block. How do I tell my code to look for the referral, then if it matchs check multiple IP blocks? ie: 70.x.x.x OR 96.x.x.x
Here is my code so far (that works with one IP block "70.x.x.x")
<?php
$referrer = $_SERVER['HTTP_REFERER'];
$visitor = $_SERVER['REMOTE_ADDR'];
if ((preg_match("/referrer-domain.com/",$referrer)) && (!preg_match("/70./",$visitor))){
echo "<meta http-equiv='refresh' content='0;url=http://www.new-domain.com'>";
}
?>
I know this is a simple question, just having a brain fart today.