// It is important to change the next line // $key = "WHATEVER"; Change the WHATEVER part in the next line and only that. $key = "pbcachecker"; $this_script = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; If (isset($_GET['action'])) $_POST['action'] = $_GET['action']; if (empty($_POST['action'])) $_POST['action'] = 'new'; function turing($code) { $image = imagecreate(100, 20); $white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF); $black = imagecolorallocate($image, 0x00, 0x00, 0x00); srand((double)microtime()*1000000); for ($i = 0; $i < 5; $i++) { $cnum[$i] = rand(0,9); } for ($i = 0; $i < 5; $i++) { $fnt = rand(3,5); $x = $x + rand(10 , 22); $y = rand(1 , 6); imagestring($image, $fnt, $x, $y, $cnum[$i] , $black); } $digit = "$cnum[0]$cnum[1]$cnum[2]$cnum[3]$cnum[4]"; header('Content-type: image/png'); imagepng($image); imagedestroy($image); return $digit; } define(HEAD,'
|
|
|

Purpose
This script is used to check coordinates solutions, generally from
a puzzle cache. The user is presented with a link. In this link
is some encoded information. The user follows the link to this script
and enters the coordinates into the boxes presented. The script
tells the user if the coordinates entered match the code in the
link.
Note: this version only processes coordinates in the North and West direction, i.e. North America.
Usage for Cache Owner
The cache owner enters the cache name, waypoint, and coordinates that will need checked in
the boxes below. Press the button. The next page will present the
owner with the HTML code for a hyper link to be inserted into the
cache description. It\'s important to keep the HTML code intact or the checker may fail
to properly check the coordinates. It\'s a good idea for the owner to make sure the link works
properly and the correct coordinates return a positive result.
Usage for Puzzle Solver
Simply follow the link from the cache page and enter the coordinates
to be checked in the appropriate boxes. Press the button. The script
will tell the solver if his solution is correct or not.
Security
In case you\'re wondering how secure this script is or if the person who hosts it
can get the coordinates, not to worry. This script was written intentionally to prevent
direct analysis as it uses a one-way hash. The only way to attack it is brute strength. In other
words, try every combination until the solution is presented. Considering there\'s approximately
2.8 million unique coordinates in a one mile radius, that\'s a lot of trying. :)
<a href=\"".$this_script."?code=".md5($key.$combined.$wp)."&action=check&wp=".$wp."&name=".$urlname."\">Check Coordinates</a>";
echo "Highlight the whole line and copy it to your cache page.
"; echo FOOT; break; case 'check': $wp = $_GET['wp']; $name = stripslashes(urldecode($_GET['name'])); $code = $_GET['code']; $name = ( $name === "" )?"No cache name defined":$name; echo HEAD; echo '
Checking Your Solution
It appears you have followed a link with an embedded code.
How to Check Your Solution
First make sure you are checking the solution for the cache displayed below.
Enter the coordinates you wish to confirm. Press "Check Coordinates".
Security Check
In order to increase the difficulty of cheating the system a human is
needed to enter 5 digits in the Security Check box. These is an image to the
right the box. Enter those numbers in the box for the script to work.