新手求教:windows上客户端(非浏览器)如何与PHP服务器交互(向服务器发送用户名、密码)?谢谢。

WBOY
Release: 2016-06-23 14:00:26
Original
966 people have browsed it

新手求教:windows上客户端(非浏览器)如何与PHP服务器交互(向服务器发送用户名、密码)?谢谢。

用户用浏览器与PHP服务器交互:
1. 浏览器请求服务器的login页面;
2. server返回页面给浏览器;
3. 用户在浏览器页面上输入用户名、密码,点击确认按钮后,账户信息带给server;
4. server进行验证,并将结果返回给浏览器;
5. 浏览器显示结果。

问题:
自行开发个windows客户端(非浏览器,如163邮箱、qq客户端那样的),认证过程跟上面浏览器的有何区别,还是一样?
PHP server上phpinfo()函数可以获取到user agent的信息:

HTTP_USER_AGENT  Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko  


回复讨论(解决方案)

Windows客户端也有封装好的Http协议,直接拼装成http头,发给php服务器;

就是windows客户端也采用浏览器一样的方式与PHP服务器交互吧?

WinHTTP

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!