Home  >  Article  >  Backend Development  >  PHP的curl请求json解决方法

PHP的curl请求json解决方法

WBOY
WBOYOriginal
2016-06-13 11:43:01835browse

PHP的curl请求json
刚学PHP不久,遇到个问题。

用PHP做登录,请求JSON如下:
action=login&sitekey=asfdae545642a1sdf55&str={"uname":"name","upass":"pass123"}
成功返回:
{"c":"0000","d":{"userid":1,"username":"wwww","email":"[email protected]"}}


大概流程我也知道,就是写出的代码不行。刚接处这一块,请大师给我详细代码:(有注释更好-_-)

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