/ Published in: PHP
URL: http://davidwalsh.name/detect-ajax
Expand |
Embed | Plain Text
/* decide what the content should be up here .... */ $content = get_content(); //generic function; /* AJAX check */ if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { /* special ajax here */ } /* not ajax, do more.... */
You need to login to post a comment.
