<? if (preg_match('/^http:\/\/(\w+\.)?(google|msn|yahoo|aol)\./',$_SERVER['HTTP_REFERER']) == 1) { ?> <!-- Google AdSense HTML --> <? } ?>