freaka Posted July 15, 2008 Share Posted July 15, 2008 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! Quote Link to comment https://forums.phpfreaks.com/topic/114831-search-engine-question/ Share on other sites More sharing options...
MadTechie Posted July 15, 2008 Share Posted July 15, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/114831-search-engine-question/#findComment-590484 Share on other sites More sharing options...
freaka Posted July 15, 2008 Author Share Posted July 15, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/114831-search-engine-question/#findComment-590492 Share on other sites More sharing options...
MadTechie Posted July 15, 2008 Share Posted July 15, 2008 yes.. //$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 Quote Link to comment https://forums.phpfreaks.com/topic/114831-search-engine-question/#findComment-590495 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.