Jump to content

Search engine question


freaka

Recommended Posts

I have been frustrated with various "multi-engine" search engines that require you to select different tabs to see the results from different search engines while searching for torrents. is there a way that you can search multiple search engines and display the results together as if they had come from the same engine? also i would like to be able to sort the results by torrent name, source, seeders, etc.. Is this possible and if so could anyone point me in a direction to learn how to combine these results? thanks a ton!

Link to comment
https://forums.phpfreaks.com/topic/114831-search-engine-question/
Share on other sites

you could use fsocket,CURL or simplely file_get_contents

 

heres a starting block (justa google and yahoo search) update $find

<?php
$URL = array("Google" => "http://www.google.co.uk/search?q=", "Yahoo"=>"http://uk.search.yahoo.com/search?p=");
$found = array();
$find = "test";
//get the results
foreach($URL as $Engine => $Search)
{
$found[$Engine] = file_get_contents($Search.$find);
}

//$found is an array of the results, your need to parse this data into a more friendly results page, 
//probably best to use a regex to filter the links into an array then merge them and sort and then 
//build a new page
echo "<pre>";
print_r($found);
echo "</pre>";
?>

 

**UNTESTED

that did seem to work in the sense that it searched both yahoo and google, but the results where in seperate tables. what im trying to achieve is all results go into one block of data. here's a visual example of what im saying.

 

    name            size        seeds      peers    source

blah2.0          344.5mb      534        3443      mininova.org

blah2.0x        345.2mb      43          415      btjunkie.org

blah final        543.8mb      75          523      isohunt.com

 

 

is this possible? and to still be able to sort the table by amount of seeders/peers/source/etc?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.