A couple of solutions stand out:
- Store names and classes in the database and refer to them with a numerical identifier instead of passing data in the query
- Keep the information in the request, but add a secure hash that will prevent unauthorized use of data.
The hash mechanism would be something like this:
$name $class. GET, $name, $class , . - :
$salt = "this is my secret";
$hash = md5($name . $class . $salt);
$url = "http://www.mysite.com/certificate.php?name=" . urlencode($name) . "&class=" . urlencode($class) . "&hash=" . $hash;
, , :
$salt = "this is my secret";
$expected = md5($_GET['name'] . $_GET['class'] . $salt);
if ($expected != $_GET['hash']) {
die("You are not authorized");
} else {
}