Loading ...
Sorry, an error occurred while loading the content.

13800Re: [CentralTexasGeocachers] HOWTO: Puzzle Final Coordinate Validation

Expand Messages
  • Roger Banks
    Nov 3, 2005
    • 0 Attachment
      From one computer nerd to another, this is a perfectly valid and
      acceptable way to solve a puzzle. Every bit as valid as someone using
      pencil, paper, and slide rule to solve it the 'intended' way. There is
      alway more than one way to skin a cat, especially when computers are
      involved.

      -- Roger

      Alan wrote:

      >I like coordinate validation scripts also. I like to write scripts that
      >"bang" at the validation scripts until it coughs up the coordinates. :-D
      >
      >
      >Nick Silkey wrote:
      >
      >
      >
      >>A few of the regulars have expressed how much they appreciate
      >>coordinate validation on our puzzle caches. The code behind this is
      >>really simple. They have asked me to offer up the code so others may
      >>take advantage. The code is bare-bones and could likely be
      >>implemented better, but it hasnt failed thus far. If you have a
      >>access to a webserver with PHP installed, it should suffice just fine
      >>for your validation needs. Enjoy.
      >>
      >>*Time Warner has informed me that their personal pages service for
      >>customers does not have PHP installed. I assume SBC has the same
      >>limitation.
      >>
      >>The below code is used to validate 'exact' coordinates (i.e. margin of error)
      >>
      >>INDEX.HTML
      >>---
      >><html>
      >><head>
      >><title></title>
      >></head>
      >><body>
      >><form action="validate.php" method="post">
      >><p>Latitude: <br />
      >>N <input name="lat1" type="text" size="2" maxlength="2"
      >>value="30"/>°<input name="lat2" type="text" size="2"
      >>maxlength="2"/>.<input name="lat3" type="text" size="3"
      >>maxlength="3"/>'<br />
      >>Longitude: <br />
      >>W 0<input name="long1" type="text" size="2" maxlength="2"
      >>value="97"/>°<input name="long2" type="text" size="2"
      >>maxlength="2"/>.<input name="long3" type="text" size="3"
      >>maxlength="3"/>'<br /></p>
      >><input type="submit" />
      >></form>
      >></body>
      >></html>
      >>
      >>
      >>VALIDATE.PHP
      >>---
      >><html><body>
      >><?php
      >>if ( $lat1 == "30" && $lat2 == "12" && $lat3 == "345" && $long1 ==
      >>"97" && $long2 == "12" && $long3 == "345" ) {
      >>echo 'Your coordinates look good.<br />';
      >>echo 'The cache is hidden at N 30 12.345, W 97 12.345.<br />';
      >>} else {
      >>echo 'Your coordinates seem off.<br />';
      >>echo 'Perhaps you need to recheck your puzzle skills.<br />';
      >>echo 'Fire off an <a
      >>href="mailto:cacheowner@...">e-mail</a> if youre really
      >>lost.';
      >>}
      >>?>
      >></body>
      >></html>
      >>
      >>The below code is used to validate ranges (i.e. 'A Trying Triangle'
      >>(GCQJ6F) ... to make people hit it on the mark on that one would be
      >>cruel and unusual ... ;)
      >>
      >>VALIDATE.PHP
      >>---
      >><html><body>
      >><?php
      >>if ( $lat1 == "30" && $lat2 == "12" && $lat3 >= "345" && $lat3 <=
      >>"678" && $long1 == "97" && $long2 == "12" && $long3 >= "345" && $long3
      >><= "678" ) {
      >>echo 'Your coordinates look good.<br />';
      >>echo 'The cache is hidden at <b>N 30 12.456 W 097 12.456</b>.<br />';
      >>} else {
      >>echo 'Your coordinates seem off.<br />';
      >>echo 'Perhaps you need to recheck your puzzle skills.<br />';
      >>echo 'Fire off an <a
      >>href="mailto:cacheowner@...">e-mail</a> if youre really
      >>lost.';
      >>}
      >>?>
      >></body>
      >></html>
      >>
      >>Happy to answer any questions.
      >>
      >>--
      >>Nick Silkey
      >>a.k.a. filler of 'filler & bcat'
      >>N30 28.2' W097 46.6
      >>
      >>
      >>
      >>
      >
      >
      >
      >
      >Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >
      >

      --
      Roger Banks Applied Research Laboratories
      Engineering Scientist Associate 512/835-3069
      mailto:banks@... http://ccwf.cc.utexas.edu/~banks
      PGP Public Key ID: 0x04C62FEC or finger or www.
    • Show all 10 messages in this topic