Ron Fredericks
Member
Posted 2 years ago #
Hi:
Some folks want to play my wordpress blog site's videos from their site using an iframe reference back to my wordpress blog. The video's play badly and I have asked them to stop, but they have chosen not to stop. So I added the following code to display a copyright violation within their iframe. It's not very effective, can anyone else suggest a way to block this type of reference to a wordpress blog site that is more iron clad?
<?php
//iframe misuse test inside my template's header.php file
if(isset($_SERVER['HTTP_REFERER'])) {
$this_referer = strtolower($_SERVER['HTTP_REFERER']);
$invalid_referer = "hackersite.com";
$this_referver_pos = strpos( $this_referer, $invalid_referer);
if ( $this_referver_pos == false) {
// valid server reference to this site
} else {
echo "<h1>Warning: Possible Copyright Violation</h1>";
echo "<p>Contact the owner of this site to report misuse of copyrighted material.</p>";
exit;
}
} else {
// link not referred
}
?>
This plugin prevents your blog from being loaded in an iFrame:
http://wordpress.org/extend/plugins/remove-the-diggbar/
There was a thread in WordPress.com for a similar problem, resolved yesterday I think - the site that was stolen had to send a take down notice and DCM violation letter and phone call to the host.
The above plug-in looks nice also.
Ron Fredericks
Member
Posted 2 years ago #
Thanks for the updates. I was hoping my simple hack posted here would point me to some other solutions.
Ron
Ronf, you can simply block this website with your .htaccess, how about it ?
Either
deny from stealingwebsite.com
or
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://stealingwebsite.com/ [NC]
RewriteRule \.jpg$ http://www.a-picture-host.com/please-dont-steal-my-contents.jpg [R,L]
The second solution might look more pleasant, but it could be taken as an agressive provocation (the visitors of the other website would see your picture message) and invite the other website to find a workaround.