(reprise du message précédent)
Et ceci, renvoi quoi ?
Et ceci, renvoi quoi ?
<?php
$infos['login'] = "X";
$infos['password'] = "Y";
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, "https://ws.colissimo.fr/widget-point-retrait/rest/authenticate.rest");
curl_setopt( $ch, CURLOPT_HEADER, FALSE );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, TRUE );
curl_setopt( $ch, CURLOPT_POST, TRUE );
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt( $ch, CURLOPT_VERBOSE, 1);
curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode($infos));
$REPONSE = curl_exec( $ch );
curl_close( $ch );
if ($REPONSE === true) { echo 'Renvoi true !<br>'; }
elseif ($REPONSE === false) { echo 'Renvoi false !<br>'; }
else { echo 'Renvoi : '.$REPONSE.' !<br>'; }
//$result = json_decode($REPONSE, true);
//$token = $result['token'];
?>