Jump to content

Recommended Posts

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">

<html>

<head>

<title>Live Search API 2.0 through PHP</title>

</head>

<body>

<?php

$BING_API = "86539350360783460kdg903597350dg046t70464-06-";

?>

<form "post" action="<?php echo $PHP_SELF;?>">

<input type="text" id="searchBox" name="searchBox" value="<?php

if (isset($_POST['searchBox'])){

echo($_POST['searchBox']);

}

else {

echo('Microsoft');

}

?>"/>

<input type="submit" value="Search" name="submit" id="searchButton" />

<?php

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>');

}

echo("</ul>");

}

?>

</form>

</body>

</html>

 

 

 

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

 

Ray

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.