PHP code example of ics / websearch-bundle
1. Go to this page and download the library: Download ics/websearch-bundle library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ics / websearch-bundle example snippets
// config/bundles.php
return [
// ...
ICS\WebsearchBundle\WebsearchBundle::class => ['all' => true],
];
//...
use ICS\WebsearchBundle\Service\QwantService;
//...
/**
* @Route("/search",name="websearch")
*/
public function search(QwantService $service)
{
$search = "Imperium Clan Software";
$searchResults = $service->search($search);
return $this->render('search.html.twig',[
'results' => $searchResults,
]);
}
//...
use ICS\WebsearchBundle\Service\QwantService;
//...
/**
* @Route("/search",name="websearch")
*/
public function search(QwantService $service)
{
$search = "Imperium Clan Software";
$searchResults = $service->searchWeb($search);
return $this->render('search.html.twig',[
'results' => $searchResults,
]);
}
//...
use ICS\WebsearchBundle\Service\QwantService;
//...
/**
* @Route("/search",name="websearch")
*/
public function search(QwantService $service)
{
$search = "Imperium Clan Software";
$searchResults = $service->searchImages($search);
return $this->render('search.html.twig',[
'results' => $searchResults,
]);
}
//...
use ICS\WebsearchBundle\Service\QwantService;
//...
/**
* @Route("/search",name="websearch")
*/
public function search(QwantService $service)
{
$search = "Imperium Clan Software";
$searchResults = $service->searchVideos($search);
return $this->render('search.html.twig',[
'results' => $searchResults,
]);
}
//...
use ICS\WebsearchBundle\Service\QwantService;
//...
/**
* @Route("/search",name="websearch")
*/
public function search(QwantService $service)
{
$search = "Imperium Clan Software";
$searchResults = $service->searchNews($search);
return $this->render('search.html.twig',[
'results' => $searchResults,
]);
}