Find wheather its ajax request or not in PHP

by satheeshkumar 2014-02-05 16:28:43

Find wheather its ajax request or not using PHP,


if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
{
/*your code here*/
}

1137
like
0
dislike
0
mail
flag

You must LOGIN to add comments