如何转换为 PHP 控制台 CURL

问题描述

他们这样写: curl -X POST -H '授权:基本 YTI...Hg=' 'https://allegro.pl/auth/oauth/token?grant_type=authorization_code&code=pOPEy9Tq94aEss540azzC7xL6nCJDWto&redirect_uri=http://exemplary' >

但我很困惑如何将其转换为 PHP 语言 我像底部一样尝试,此代码必须接收一些令牌才能访问页面快板

$ch = curl_init(); curl_setopt($ch,CURLOPT_URL,"https://allegro.pl/auth/oauth/authorize?response_type=code&client_id=###&redirect_uri=http://exemplary.redirect.uri&code_challenge_method=S256&code_challenge=###");

//curl_setopt($ch,"https://allegro.pl/auth/oauth/authorize?response_type=code&client_id=###&redirect_uri=http://exemplary.redirect.uri&code_challenge_method=plain&code_challenge=## #");

curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$output = curl_exec($ch);
curl_close($ch);     

echo $output;

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)