corz.org uses cookies to remember that you've seen this notice explaining that corz.org uses cookies, okay!
<?php //۞//text{encoding:utf-8;bom:no;linebreaks:unix;text:4 spaces/tab;}
/*
A simple HotLink test script. v0.2.1
Enter your image location into the text input, if you see your image
Hot-link protection isn't working! Better fix that, here..
https://corz.org/server/tricks/htaccess2.php
;o)
*/
$image = '';
if (isset($_POST['image'])) { $image = $_POST['image']; }
if (!stristr($image, 'http://')) $image = 'http://'.$image; //
// initialize..
do_header();
@include $_SERVER['DOCUMENT_ROOT'].'/inc/header.php';
echo '
<div class="content">
<span class="title" title="erm..">HotLink Test <small>for....</small></span><br />
<div class="centered">
<span style="font-size:1.5em;color:brown" title="erm..">',$image,'</span><br />
<br />
<img src="',$image,'" alt="image goes here" />
</div><br />
<br />
<form id="hotlink-test-form" method="post" action="',$_SERVER['REQUEST_URI'],'">
<label>Enter image location..<br />
<input type="text" size="75" id="image" name="image" value="',$image,'" />
</label>
<input type="submit" name="do-it" id="do-it" value="do it!" title="do it!" />
</form><br />
<br />
<small>Test your <a href="https://corz.org/server/tricks/htaccess2.php"
title=".htaccess tricks and tips home - need .mod_rewrite theory & practice - go here"
id="excellent-mod-rewrite-page">.htaccess mod_rewrite</a> hotlink code.<br />
Enter your image URL and click "do it" - if you see it, you need to try again!</small><br />
<br />
<div class="notes">
<strong><small>NOTE:</small></strong><br />
While most browsers will grab a fresh version of the image when
you simply refresh the page, some won\'t. If it\'s an image you have recently viewed,
don\'t forget to clear your browser cache/restart your browser before testing,
or you could easily end up screwing completely workable hot-link code without
realizing it.<br />
<br />
A good system, I find, is to have a directory listing open in one browser tab; a folder of images
on the server in question, somewhere covered by your .htaccess rules, preferably filled with new
images, images that have never been viewed in a browser,
and for each hot-link test, simply use the next image. In other words, don\'t use the same image twice.<br />
<br />
<span class="red big">If you are looking for a way to get instant-payback from sites stealing your images, checkout
<a href="https://corz.org/server/tools/auto-hot-link/" title="Run my promotions for me, for free!"
id="link-server-tools-auto-hotlink">this</a>.</span><br />
</div>
</div>';
@include $_SERVER['DOCUMENT_ROOT'].'/inc/footer.php';
echo'
</body>
</html>';
function do_header() {
echo '<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<title>Hot-Link Test! Test your .htaccess mod_rewrite hotlink code right here..</title>
<meta name="description" content="Test your .htaccess mod_rewrite hot-link code right here. enter your URL - if you see the image, you need to try again!" />
<style media="screen">
/*<![CDATA[*/
@import "/inc/css/main.css";
@import "/inc/css/footer.css";
body {
font-family: Tahoma, Lucida Grande, Helvetica, Verdana, sans-serif;
color: #000;
font-size: 11pt;
margin: 0;
width: 100%;
height: 100%;
float: none;
clear: both;
}
.content {
float: none;
clear: both;
margin-top: 100px;
margin-left: 15%;
margin-right: 35%;
margin-bottom: 0;
top:-1em;
position:relative;
}
.centered { text-align: center; }
.title {
left:4em;
font-size:5em;
color:red
}
.notes {
font-size: x-small;
width: 80%;
text-align: justify;
}
label {
font-size: small;
font-weight: bold;
}
//-->
/*]]>*/
</style>
</head>
<body>';
}
?>