2016-04-29 12 views

Antwort

0

Verwenden Curl:

Ein Beispiel:

<?php 

// if you get the code here from the url, 
$code = $_GET['code']; 

$ch = curl_init(); 

curl_setopt($ch, CURLOPT_URL,"http://api.another.com/"); 
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_POSTFIELDS, 
      "token_grant_type=authorization_code&code=" + $code); 

// receive server response ... 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 

$server_output = curl_exec ($ch); 

curl_close ($ch); 

?> 
Verwandte Themen