-3
とカール置き換えますは私がfile_get_content(私は敏感な情報を削除した)とカール交換する必要がありfile_get_content
$url = 'https://api.instagram.com/oauth/access_token?client_id=aaa&client_secret=bbb&grant_type=authorization_code&redirect_uri=http://testtest.altervista.org/instagram/&code=ccc';
print json_decode(file_get_contents($url));
:
curl -F 'client_id=aaa' \
-F 'client_secret=bbb' \
-F 'grant_type=authorization_code' \
-F 'redirect_uri=http://testtest.altervista.org/instagram/' \
-F 'code=ccc' \
https://api.instagram.com/oauth/access_token
私はこれが、doens't仕事を(それが何も返さない)しようと試みどうして ?
ブラウザでそのURLを実行するとどうなりますか? – Exception
あなたは 'shell'のcURLコマンドをPHPのfile_get_contentsで置き換えています...ここで本当の目的は何ですか? – YvesLeBorg
URLの中にURLがある場合、内側のURLは 'urlencode()'でなければなりません。何も得られない場合は、エラーログまたは少なくとも呼び出しによって返されたヘッダーとステータスコードを表示すると便利です。 – DanFromGermany