It must be noted however that this is just a basic security step and it does not guarantee that a malicious user can not find a way to access the php file. This means that you should always make sure that your php code is secure.
How to block direct access to php file called by ajax function
March 22, 2012
In php you can emulate an ajax request by inserting a proper header. With this header you can prevent users from directly accessing php pages that are meant only for ajax calls.
Login to post comments