Related Search Results.
Search for
<?php if ($domain_name==$last_domain && $merge_site_results == 1 && $domain == ""

{?>
[ <a href="<?php print 'search.php?query='.quote_replace(addmarks($query)).'&search=1&results='.$results_per_page.'&domain='.$domain_name?>">More results from <?php print $domain_name?></a> ]
</div class="idented">
<?php }?>
<br/>
<?php }?>
</div>
<?php }?>
After this Add
<?php
/************Related Search System Starts Here**************/
$rel_links = "<div style=font-size:16px;>Searches related to: <b>".$query."</b></div>";
echo $rel_links;
$trimmed = $query; /******* we're only search for one word *****/
//We're only selecting one field
$sqql = mysql_query("SELECT keyword FROM keywords LIMIT 5"

;
while($r = mysql_fetch_array($sqql))
{
$tok = strtok($r["keyword"], ", "

; //parse the multi-word string returned
while($tok !== false)
{
//needed to strip a quote character that enclosed the string inside the field
similar_text(strtoupper($trimmed), trim(strtoupper($tok),'"'), $percentage);
$percentage = number_format($percentage, 0);
if($percentage >= 15) //define a threshold, in this case an 15 percent match
{
//prints the results to clearly indicated which terms meet the threshold
$results_record["<a href='search.php?query=$tok&search=1'><font color=\"#ff0000\"> " .
trim(strtoupper($tok),'"') . "</font><font color=\"#0000CC\"> " .
$r[field_name] . "</font></a>"] = $percentage;
}
$tok = strtok(", "

;
}
}
if (!$results_record)
{
echo " <b>oOps !! No Related Search found !</b>";
}
else
{
asort($results_record, SORT_NUMERIC);
//echo key pair values
foreach($results_record as $result => $percentage)
{
echo $result . " - " . $percentage."%<BR>" ;
}
}
/************Related Search System Ends Here**************/
?>
Enjoy.
If this [MOD] not work reply to this post!
Regarding,
Muhammad Kamran Wajdani
Muzaffargarh, Punjab, Pakistan.