Is there anyway to check whether an incoming request is of AJAX JSON type?
I tried
if(($_SERVER[\'REQUEST_METHOD\']==\'JSON\')) { }
you can always set an extra header specifying that, or use an arbitrary variable to indicate JSON requests.