Note to self: you can tell whether a PHP script is being called from another script using include() or is being accessed directly using this simple function:
function is_included () { if (strpos('[Root]' . __FILE__, $_SERVER['PHP_SELF']) > 4) { return false; } else { return true; } }
The function will return true if the script is being included by another script and false if the script is accessed directly.
Keep it up man.,