我想将curl转换为wp\\u remote\\u get。
$url = \'https://accounts.google.com/o/oauth2/token\';
$curl_post = \'client_id=\' . $client_id . \'&redirect_uri=\' . $redirect_uri . \'&client_secret=\' . $client_secret . \'&code=\' . $code . \'&grant_type=authorization_code\';
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $ch, CURLOPT_POST, 1 );
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $curl_post );
$data = json_decode( curl_exec( $ch ), true );
$http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );