try adding the -inurl filer like this:
$url = 'http://boss.yahooapis.com/ysearch/web/v1/'.urlencode($term).'?appid='.$appID.'&view=keyterms&sites='.urlencode($sites).'&abstract=long&count='.$count.'&format=xml&start='.$start.'&-inurl=domain/path';
remember to change domain/path to your domain, and the path you wish to exclude.