Another web site has framed my company's site in theirs without our consent. The other site is pretending to be associated with ours.
I can break our site out of their frameset with simple javascript but I'd like to go a step further and present an alert to the visitor that the rogue site is not related to my company.
So I tried detecting for http_referer.
I understand that http_referer is not a perfect solution as not all browsers send this data. I'm not having success with MSIE. Every other major browser appears to handle this.
Can anyone suggest another way to detect if the site is being contained in an iframe from a particular domain?
I can break our site out of their frameset with simple javascript but I'd like to go a step further and present an alert to the visitor that the rogue site is not related to my company.
So I tried detecting for http_referer.
Code:
if ($_SERVER['HTTP_REFERER']=="[URL unfurl="true"]http://www.theroguesite.com")[/URL] {
header("Location: [URL unfurl="true"]http://www.oursite.com/alertmessage.php");[/URL]
exit;
}
I understand that http_referer is not a perfect solution as not all browsers send this data. I'm not having success with MSIE. Every other major browser appears to handle this.
Can anyone suggest another way to detect if the site is being contained in an iframe from a particular domain?