I just use sommit like the following for domain check & i use a package to obfuscate the scripts themselves
$licensed_domain="mydomain.com";
$domain_test =$_SERVER['SERVER_NAME'];
if ($domain_test !== $licensed_domain) {
echo " Domains dont Match ";
die;
}