简体   繁体   中英

Remote login on website using php, curl and api

I am trying from 1 week to login on yelp using php, curl and api, but i am not success. I got this output from my code: {"message": {"field": "signature", "text": "One or more parameters are missing in request", "code": 8, "version": "1.1.1", "request_id": "2a372375b650682c"}}

First of, replace your passwords !

then you should watch at this part :

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

you need to seperate the strings like this :

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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