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 10 weeks 1 day ago – Made popular 10 weeks 7 hours ago
Category: Wordpress News