0
你好,我想知道如何用PHP来模拟curl命令。我想模拟以下:如何用PHP模拟curl -X帖子
curl -X POST https://example.com/token\?\
client_id\=your_client_id\&\
client_secret\=your_client_secret\&\
grant_type\=client_credentials\&\
scope\=public
我出来这一点:
curl_setopt($s, CURLOPT_POST,array(
'client_id=my_id',
'client_secret/=my_secred',
'grant_type/=client_credentials',
'scope/=public'
));
,但没有运气。
[PHP +卷曲,HTTP POST示例代码η]为可能的复制(https://stackoverflow.com/questions/2138527/php-curl-http-post-sample-code) – Daan
基本谷歌搜索给你答案... – d3L