restrict direct access to file
/***************DO NOT ALLOW DIRECT ACCESS************************************/
if ( (strpos( strtolower( $_SERVER[ 'SCRIPT_NAME' ] ), strtolower( basename( __FILE__ ) ) ) ) !== FALSE ) { // NOT FALSE if the script's file name is found in the URL
header( 'HTTP/1.0 403 Forbidden' );
die( '<h2>Direct access to this page is not allowed.</h2>' );
}
/*****************************************************************************/