View Full Version : Help with designing MetaSearch Engine

07-14-2011, 01:35 PM
Hi all,

I am currently designing a meta-search engine powered by Bing's API and could do with some help on how to implement the Borda Count technique into my search engine. The Borda Count technique is where the top ranked result from the search engine receives 1 point, the second ranked result gets 2 points, the third receives 3 points and so on.

Is there anyone who could give a general outline of how one would implement this technique in a Meta-Search engine?

Here is the working code i have so far for returning results:

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<title>Live Search API 2.0 through PHP</title>
$BING_API = "86539350360783460kdg903597350dg046t70464-06-";
<form "post" action="<?php echo $PHP_SELF;?>">
<input type="text" id="searchBox" name="searchBox" value="<?php
if (isset($_POST['searchBox'])){
else {
<input type="submit" value="Search" name="submit" id="searchButton" />
if (isset($_POST['submit']))
$request = 'http://api.search.live.net/json.aspx?Appid=' . $APPID . '&sources=web&query=' . urlencode($_POST["searchBox"]);
$response = file_get_contents($request);
$jsonobj = json_decode($response);
echo('<ul ID="resultList">');
foreach($jsonobj->SearchResponse->Web->Results as $value)
echo('<li class="resultlistitem"><a href="' . $value->Url . '">');
echo('<h3>' . $value->Title . '</h3></a>');
echo('<p>' . $value->Description . '</p>');

Thanks for your time guys and any help would be greatly appreciated