PHP code example of atan / opensearch
1. Go to this page and download the library: Download atan/opensearch 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/ */
atan / opensearch example snippets
bash
php artisan vendor:publish
php
$opensearch = Opensearch::connect();
$opensearch->setQueryString("default:'关键词'");
$opensearch->setFormat('json');
$result = $opensearch->search();