Home > Backend Development > PHP Tutorial > 如何在调用discuz接口中传递登录状态

如何在调用discuz接口中传递登录状态

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:30:54
Original
2228 people have browsed it

例如我需要请求一个需要积分帖子的详情

<code>curl http://mingyinet.ihaoyisheng.com/bbs/api/mobile/index.php?submodule=checkpost&version=1&mobile=no&module=viewthread&ppp=10&tid=33&page=1
</code>
Copy after login
Copy after login

返回的数据为:

<code>{
    ...
    "Message": {
        "messageval": "thread_nopermission//1",
        "messagestr": "抱歉,本帖要求阅读权限高于 200 才能浏览"
    }
}
</code>
Copy after login
Copy after login

如何在调用discuz接口中传递登录状态?是否有可用的登录接口?

回复内容:

例如我需要请求一个需要积分帖子的详情

<code>curl http://mingyinet.ihaoyisheng.com/bbs/api/mobile/index.php?submodule=checkpost&version=1&mobile=no&module=viewthread&ppp=10&tid=33&page=1
</code>
Copy after login
Copy after login

返回的数据为:

<code>{
    ...
    "Message": {
        "messageval": "thread_nopermission//1",
        "messagestr": "抱歉,本帖要求阅读权限高于 200 才能浏览"
    }
}
</code>
Copy after login
Copy after login

如何在调用discuz接口中传递登录状态?是否有可用的登录接口?

有登陆接口的,基于你的url就是

<code>http://mingyinet.ihaoyisheng.com/bbs/api/mobile/index.php?module=login
</code>
Copy after login

和浏览器登陆的参数保持一致,大概是这样

<code>http://mingyinet.ihaoyisheng.com/bbs/api/mobile/index.php?module=login&mod=logging&action=login&username=&password=
</code>
Copy after login

具体可以看看这个文件里的参数验证

<code>bbs\source\class\class_member.php
</code>
Copy after login

的on_login方法

Related labels:
Statement of this Website
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
Latest Issues
php - discuz single sign-on problem
From 1970-01-01 08:00:00
0
0
0
How to install discuz in phpStudy
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template