在php中检索Get Http请求

ami*_*mit 1 javascript php

我需要在php中检索get http请求并将其存储在变量中.

我需要执行以下操作:

https://graph.facebook.com/oauth/access_token?
     client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&
     grant_type=client_credentials
Run Code Online (Sandbox Code Playgroud)

我知道这很简单.只是无法理解它.

She*_*hef 5

$content = file_get_contents('https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&grant_type=client_credentials');
Run Code Online (Sandbox Code Playgroud)

  • 在转到cURL之前,为file_get_contents +1. (2认同)