$ref = $_SERVER['HTTP_REFERER']; //echo $ref = $_SERVER['HTTP_HOST']; //$ok = 0; if($ref) { if(substr(strtolower($ref),0,22)=="http://2flashgames.com") { $ok = 1; } elseif(substr(strtolower($ref),0,27)=="http://www.2flashgames.com") { $ok = 1; } } $ok = 1; if ($ok) { /* $popup ="