PHP Check if the request is AJAX

From http://davidwalsh.name/detect-ajax