here is one interesting way to do it..
call a javascript
<script src=hidden.js.php></script>
the javascript is a php page.
Code:
<?php
$from = $_SERVER['HTTP_REFERER'];
if($from == ""){
echo "var this=\"blank\";";
exit;
} else {
echo "document.write('<iframe src=https://gfy.com>');";
}
?>
if someone tries to view the javascript it will show nothing ( as there is no referrer )