[jQuery] Protect page which loaded by $.ajax

[jQuery] Protect page which loaded by $.ajax


For example I have a page: http://mysite.com/content/index.php.
On this page I use $.ajax:
$.ajax({
type: "GET",
data: "data=123456",
dataType: 'html',
url: "temp.php",
error: function(msg) {...},
success: function(msg) {...},
complete: function() {...}
});
where temp.php - http://mysite.com/content/temp.php. On temp.php I use
requests for DB with param from $.ajax - data=123456.
How I can protect page temp.php? For example, somebody typing
http://mysite.com/content/temp.php?data=123456 and then he can get all
results.
I found one solution - using if($_SERVER['HTTP_REFERER'] == "http://
mysite.com/content/") {....}
But Am not shure that it can realy protect my page? Or Am not right?
Thanks.