繁体   English   中英

使用 php、curl 和 api 远程登录网站

[英]Remote login on website using php, curl and api

我试图从 1 周开始使用 php、curl 和 api 登录 yelp,但我没有成功。 我从我的代码中得到了这个输出: {"message": {"field": "signature", "text": "One or more parameters are missing in request", "code": 8, "version": "1.1.1", "request_id": "2a372375b650682c"}}

首先,更换您的密码!

那么你应该注意这一部分:

foreach($p as $oneKey=>$oneValue) {
    $string .= urlencode($oneKey) . urlencode($oneValue);
}

你需要像这样分开字符串:

$string = ""
foreach($p as $oneKey=>$oneValue) {
    $string .= ($string!="" ? "&" : "") .urlencode($oneKey) . "=" urlencode($oneValue);
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM