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 'player-index' =>$playerIndex
); );
$httpResponse=json_decode(get_IA_Response($playerURL,$paramsToSend),TRUE); $playerResponse=get_IA_Response($playerURL,$paramsToSend)['play'];
$playerResponse=$httpResponse['play'];
echo "<p>******".$playerResponse."**********</p>";
//tester la validité de la réponse //tester la validité de la réponse
if((isset($map[$playerResponse])) && ($map[$playerResponse]=="")){ if((isset($map[$playerResponse])) && ($map[$playerResponse]=="")){
//reponse conforme //reponse conforme

View File

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