par
Saian » 10 juin 2019, 20:14
Juste comme ça, si tu testes ce code :
$data = array(
'grant_type' => 'client_credentials',
'client_id' => '{Id_Key}',
'client_secret' => '{Secret_Key}');
$curls = curl_init();
curl_setopt($curls, CURLOPT_URL, 'https://test.api.amadeus.com/v1/security/oauth2/token');
curl_setopt($curls, CURLOPT_POST, true);
curl_setopt($curls, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($curls, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
$token = curl_exec($curls);
curl_close($curls);
echo 'FIN';
Ça affiche bien FIN ?
Juste comme ça, si tu testes ce code :
[PHP]$data = array(
'grant_type' => 'client_credentials',
'client_id' => '{Id_Key}',
'client_secret' => '{Secret_Key}');
$curls = curl_init();
curl_setopt($curls, CURLOPT_URL, 'https://test.api.amadeus.com/v1/security/oauth2/token');
curl_setopt($curls, CURLOPT_POST, true);
curl_setopt($curls, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($curls, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
$token = curl_exec($curls);
curl_close($curls);
echo 'FIN';[/PHP]
Ça affiche bien FIN ?