full JSON
This commit is contained in:
parent
9b2770a38a
commit
cc695b9069
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user