How to prevent direct access to load content

How to prevent direct access to load content

I have a php page that uses the a load request (see bow). I would like to prevent people viewing the content directly. I understand I could possibly check the header (also see below) but this apparently can be easily hoodwinked. Any suggestions?

Header check;
  1. </php
  2. function is_xhr() {
  3.   return @ $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] === 'XMLHttpRequest';
  4. }
  5. if( is_xhr() ){
  6. // respond to Ajax request
  7. } else {
  8. // respond to normal request
  9. }
  10. ?> 
The load request;
  1. $('.mydivcontainer').load('myContentFile.php');