$referer = array("www.2checkout.com", "2checkout.com", "www2.2checkout.com" ); while( list($key, $val) = each($referer)) { if (strstr($_SERVER['HTTP_REFERER'],$val)) { $grant = 'true'; } // End giving grant a value } // End while if($grant != 'true') { echo "

You seem to came back not from 2checkout

"; return; }