Try checking the user agent if it is not a browser Firefox , safari ...Deny accessing this will freak out the other domain that is copying your pages example:
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE){
//Internet Explorer Good
}else{
if(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== FALSE){
//FireFox Good
}else{
if(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== FALSE){
//Chrome Good
}else{
//Check for safari , Opera , AndroidBrowser and IOS browser , Internet Explorer Mobile and text phones
//else run this code
die("Acessing this site is only allowed from this domain example.com");
}
}
}
EDIT:
append this code to your .htaccess
BrowserMatchNoCase SpammerRobot bad_bot
BrowserMatchNoCase SecurityHoleRobot bad_bot
Order Deny,Allow
Deny from env=bad_bot
As people have said in comment the user agent is empty:
if(empty($_SERVER['HTTP_USER_AGENT'])){
die("Error");
}
You could also apply the ip address so it will be harder for the other domain to break you:
You can also check for the UserOperating system but it is not required as it will may cause problem for some users so just don't do it but it still a good idea.
keep me UpToDate for any help
referer
is an option but can be spoofed, and i think cannot be done at all – Dutton