I am trying to track where requests in my site. I want to track if a request was made by a resource or was a direct request, specifically.
if($_SERVER['REMOTE_ADDR'] != $theme_sites_server){
$remote_addr = 'DIRECT';
} else {
$remote_addr = 'Internal/modX';
}
$theme_sites_server would equal my site's IP address.
I don't think this is best practice and would like to know if modx has a way to detect such data.