Hi :) I want to forbid access of a page directly, what i mean is if some one try to access for example the page
proccess.php
He will get an error message. BUT! if the page is accessed via AJAX call, it will act normal.
i've tried:
if( preg_match( '/' . basename( __FILE__ ) . '/', $_SERVER['REQUEST_URI'] ) )
{
die("Error!");
}
but the problem is that when i access it via AJAX call, it act like i've accessed it directly...
please help :)