nice_query) > 0) ? "Check out these Goosle search results about: '".urldecode($search->nice_query)."'." : "Check out these Goosle search results!";
?>
query)) {
// Curl
$mh = curl_multi_init();
// Load search script
if($search->type == 0) {
require ABSPATH.'engines/search.php';
$search_results = new Search($search, $opts, $mh);
} else if($search->type == 1) {
require ABSPATH.'engines/search-image.php';
$search_results = new ImageSearch($search, $opts, $mh);
} else if($search->type == 2) {
require ABSPATH.'engines/search-news.php';
$search_results = new NewsSearch($search, $opts, $mh);
} else if($search->type == 9) {
require ABSPATH.'engines/search-magnet.php';
$search_results = new MagnetSearch($search, $opts, $mh);
}
$running = null;
do {
$status = curl_multi_exec($mh, $running);
if($running) {
curl_multi_select($mh);
}
} while ($running && $status == CURLM_OK);
$results = $search_results->get_results();
curl_multi_close($mh);
// Add elapsed time to results
$results['time'] = number_format(microtime(true) - $start_time, 5, '.', '');
// Echoes results and special searches
$search_results->print_results($results, $search, $opts);
} else {
echo "
";
}
?>