//The complete free software package may be dowloaded from http://tyaga.org/kit/.
<?php

if (isset($_POST['prowl'])) {
  
$_GET['prowl'] = $_POST['prowl'];
}

if (
$url) {
  if (
file_exists($url)) {
      if (!
headers_sent()) {header("Content-Type: text/plain");}
      
$message file_get_contents($url);
  }
  else {
      
$message "The file "$url ." was not found within this site.";
  }
}
else if (
substr($_GET['prowl'],0,3) == "get") {
  if (!
$db5) {include("../../db5_connect.php");}
  
  
$record substr($_GET['prowl'],4);
  
$record stripslashes($record);
  
$record str_replace("~","%",$record);
  
$sql "SELECT record FROM journal WHERE record LIKE '$record'";    
  
$result mysql_query($sql);
       
  if (!
$result) {
    
$message "Query Error: "$sql ." "mysql_error();
  }
  else {
    
$num_rows mysql_num_rows($result);      
    if (
$num_rows!=0) {
      while (
$select=mysql_fetch_assoc($result)) {
        
$message $message $select['record'] ."<br />";
      }
    }
    else {
      
$message "No records matching \""str_replace("%","~",$record) ."\" found within this site.<br />";
    }
  }
}
else {
  
$_GET['prowl'] == "get ";
}

if (
$message) {
  echo 
$message;
}
else {
  
?>
  <br />Type the record that you wish to verify and get from within this site. Make sure to include the "get" keyword. 
  <form method="POST" action="">  
  <input type="text" name="prowl" value="<?php echo $_GET['prowl']?>" size="80"/><input type="submit" name="submit" value="Submit" /> 
  </form>
  <?php
}  
?>
1