search
Homephp教程php手册七、公交查询,百科,提问,词典,诗词

公交查询,百科,提问,词典,诗词
此次实现的api来自虫洞,感谢作者为我们提供这些接口.因为是调用api接口,所以很操作很简单.效果图如下


1、主页面
七、公交查询,百科,提问,词典,诗词

2、列表页面
七、公交查询,百科,提问,词典,诗词

4.1:公交查询
七、公交查询,百科,提问,词典,诗词

4.2:百科.
七、公交查询,百科,提问,词典,诗词

4.3:提问, 4.4:词典
七、公交查询,百科,提问,词典,诗词

4.5:诗词
七、公交查询,百科,提问,词典,诗词

代码如下

1、共同操作private function _bug_comm($msg,$appid){<br>     $param=array(<br>         "ch"    => "1001",//以区分请求来源<br>         "type"  =>   "wap",<br>         "appid" =>   "$appid",<br>         "info"  =>   "$msg"<br>     );<br>     $msg=http("http://wap.unidust.cn/api/searchout.do",$param);<br>     $content=str_replace("<br>","\n",$msg);<br>       <br>     $content.="\n\n小助手:回复 @ 进入主界面";<br>   <br>     return array($content,"text");<br> }2、实现代码//公交<br> private function get_bus($find_name){<br>     return $this->_bug_comm($find_name,"11");<br> }<br>    <br> //百科<br> private function get_wiki($find_name){<br>     return $this->_bug_comm($find_name,"111");<br> }<br>    <br> //提问<br> private function get_ask($find_name){<br>     return $this->_bug_comm($find_name,"121");<br> }<br>    <br> //词典<br> private function get_dict($find_name){<br>     return $this->_bug_comm($find_name,"431");<br> }<br>    <br> //诗词<br> private function get_poem2($find_name){<br>     return $this->_bug_comm($find_name,"531");<br> }oK,感谢浏览。

七、公交查询,百科,提问,词典,诗词
休闲豆http://www.xiuxiandou.com

AD:真正免费,域名+虚机+企业邮箱=0元

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor