Maybe try naming the constants after the domain? Then if it exists, include it!
PHP Code:
// Grab hostname
$host = strtolower( $_SERVER['HTTP_HOST'] );
// Remove `www.` prefix if necessary
$host = preg_replace( '/^www\./', '', $host );
// Name the file to be included
// - www.google.com -> `../const/google.com.php`
$file = '../const/' . $host . '.php';
// If the file exists, include it
if ( is_file( $file ) )
{
include $file;
}