Hello, what would be the best way to prvent people to run a php script/file that is on ajax.post(URL)
$.ajax({
type: 'POST',
url: 'http://www.mydomain.com/ajax/somefile.php?action=insert',
data: data,
success: success,
dataType: dataType
});
if you see code above...let's say that an advanced user or hacker go to: http://www.mydomain.com/ajax/somefile.php?action=insert i would like to echo something like: go away...and prevent any code for running.
I saw codeigniter uses this at the top of every file:
if (!defined('BASEPATH')) exit('No direct script access allowed');.
Any recomendation??? .htaccess????