$website_referer = $_SERVER['HTTP_REFERER'];if(strpos($website_referer , 'http://www.google.')!==FALSE){ //comes from a Google domain}