PHP and jquery restrict direct access
Posted
by Sergio
on Stack Overflow
See other posts from Stack Overflow
or by Sergio
Published on 2010-04-12T10:40:33Z
Indexed on
2010/04/12
10:43 UTC
Read the original article
Hit count: 432
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?
© Stack Overflow or respective owner