Re: Block a site from accessing mine
Yes, could do it through PHP. The page referrer if it exists is held in $_SERVER['HTTP_REFERER']
So you could use the following:
Code:
if(substr_count($_SERVER['HTTP_REFERER'],"dodgysite.com") > 0){
header("Location: you_cant_view_this_site.php");
}
It would be better to do it at the web server level, but you probably won't be able to access the apache config. If you can you can do it using mod_rewrite.
|