Is it possible to restrict direct access to PHP file if I use jquery .load function like this one:
$(document).ready(function(){
$("#second").load("testip.php");
});
In this case I want to restrict direct access to file testip.php that will instert data in database.
Can I do it using some PHP function that will compare visitors IP address and server IP at “testip.php” file or there is some better way to do it?
This could be helpful.
Detecting ajax events on the server