DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Test If Called From XMLHttpRequest

07.12.2007
| 5834 views |
  • submit to reddit
        
if($_SERVER["HTTP_X_REQUESTED_WITH"] == 'XMLHttpRequest')
{
  // Called from XMLHttpRequest
}
    

Comments

Snippets Manager replied on Thu, 2007/07/19 - 9:31pm

Fantastic if it works!