×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
1
Language: PHP
Posted by: Massimo Zappino
Added: Jan 22, 2011 10:58 AM
Modified: Jan 22, 2011 10:59 AM
Views: 126
Tags: ajax request
  1. function isAjax()
  2. {
  3.     if ( !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' ) {
  4.        return true;
  5.     }
  6.     return false;
  7. }