full JSON

This commit is contained in:
gnieark 2016-05-29 22:43:45 +02:00
parent 9b2770a38a
commit cc695b9069
2 changed files with 3 additions and 4 deletions

View File

@ -72,9 +72,8 @@ switch ($_POST['act']){
'player-index' =>$playerIndex
);
$httpResponse=json_decode(get_IA_Response($playerURL,$paramsToSend),TRUE);
$playerResponse=$httpResponse['play'];
echo "<p>******".$playerResponse."**********</p>";
$playerResponse=get_IA_Response($playerURL,$paramsToSend)['play'];
//tester la validité de la réponse
if((isset($map[$playerResponse])) && ($map[$playerResponse]=="")){
//reponse conforme

View File

@ -51,5 +51,5 @@ function get_IA_Response($iaUrl,$postParams){
curl_close($ch);
echo '<p>'.$data_string.'</p>';
echo '<p>'.$output.'</p>';
return htmlentities($output);
return json_decode($output,TRUE);
}