Could someone please advise if this is ok or not.
I?ve been getting a lot of hits to register.php and newthread.php from sources other than my site so I?ve added this code to register.php and newthread.php so that they can only be accessed when referred from my site.
At the top of each pager after <?php add
PHP Code:
//---------------------------------------------------------------------
// if the request comes from my site then render the page
if(stristr($_SERVER['HTTP_REFERER'], "mysite.com")) {
//---------------------------------------------------------------------
At the bottom of each page defore ?> add
PHP Code:
//------------------------------------------------------------------
// if the referring page is not from my site, then redirect the user
}
else {
header("Location: ../forums");
}
//------------------------------------------------------------------