7

Detect an AJAX Request in PHP

http://advancedphptutorial.blogspot.com

I like using the same PHP script for both AJAX and non-AJAX content requests. Using one script just makes everything easier because it’s only one file to update/edit and it’s one more cache-able request. One way to try detect an AJAX request (as opposed to a regular page load) is by using the following PHP code

Created by learnphp123 1 year 32 weeks ago – Made popular 1 year 32 weeks ago
Category: Wordpress News