مر علي موضوع سابق والحمدلله وجدته 
كود PHP:
if (preg_match("'google\.¦brisbane\.'", $_SERVER['HTTP_REFERER']))
{
preg_match("'q=([^&]+)'", $_SERVER['HTTP_REFERER'], $match);
$terms = $match[1];
} elseif (preg_match("'yahoo\.'", $_SERVER['HTTP_REFERER'])) {
preg_match("'p=([^&]+)'", $_SERVER['HTTP_REFERER'], $match);
$terms = $match[1];
}
if ($terms!= '') {
$terms = preg_split('/\s+¦\++/', $terms);
for($i=0;$i<count($terms);$i++) {
$terms[$i] = "'\b(" . preg_quote(htmlentities($terms[$i]), "'") . ")\b'i";
}
$line = preg_replace($terms, "<em>\\1</em>", $line);
}
مع العلم اني ماجربته لكن اظن النواتح تكون في المصفوفة line
وهذا الموضوع الدسم للفائدة
http://www.webmasterworld.com/forum88/334.htm