- detect ajax call with $_SERVER['HTTP_X_REQUESTED_WITH'] and display result as json