RayMount78 Posted July 14, 2011 Share Posted July 14, 2011 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 Link to comment https://forums.phpfreaks.com/topic/241969-php-script-metasearch-engine-with-borda-count-aggregation/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.