Answers for "php x-requested-with"

PHP
2

check if ajax request php

if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
	/* special ajax here */
	die($content);
}
Posted by: Guest on August-31-2020

Browse Popular Code Answers by Language