| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace Heanup\App\Api\Controller;
- use Heanup\App\Api\Config\Site;
- use Heanup\App\Api\Controller;
- use Heanup\App\Api\Model\Dataoke;
- class Search extends Controller
- {
- public function main()
- {
- $kw = $this->getQuery()->string("kw")?:$this->getQuery()->string("args_0");
- $bids = $this->getQuery()->string("bids");
- $cid = $this->getQuery()->string("cid");
- $request=[
- 'r'=>'l',
- 'u'=>Site::getData("user_tag")
- ];
- if ($kw){
- $request['kw']=urldecode($kw);
- }
- if ($bids){
- $request['bids']=$bids;
- }
- if ($cid){
- $request['cid']=$cid;
- }
- $url = Site::getData('site_url') . "/tao.php?".http_build_query($request);
- $content= Dataoke::parse(file_get_contents($url));
- $this->setCache($content);
- }
- }
|