query) { echo "

Example API request: ./api.php?q=gentoo&p=2&t=0


\"q\" is the keyword

\"p\" is the result page (the first page is 0)

\"t\" is the search type (0=text, 1=image, 2=video, 3=torrent, 4=tor)


The results are going to be in JSON format.

The API supports both POST and GET requests.

"; die(); } $results = fetch_search_results($opts, false); header("Content-Type: application/json"); echo json_encode($results); ?>