Is there anyway to check whether an incoming request is of AJAX JSON type?
I tried
if(($_SERVER[\'REQUEST_METHOD\']==\'JSON\')) { }
You can do a check on the accept param, if it's text/javascript your talking json, if it's text/xml guess what :P
$_SERVER['HTTP_ACCEPT']