Created
November 29, 2013 15:26
-
-
Save nicklasos/7707278 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function isAjax() | |
{ | |
return | |
isset($_SERVER['HTTP_X_REQUESTED_WITH']) && | |
$_SERVER['HTTP_X_REQUESTED_WITH'] && | |
strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment