diff --git a/src/arenas/connectFour/functions.php b/src/arenas/connectFour/functions.php index c7f2d7f..b6208ce 100644 --- a/src/arenas/connectFour/functions.php +++ b/src/arenas/connectFour/functions.php @@ -22,7 +22,6 @@ function get_IA_Response($iaUrl,$postParams){ 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string)) ); - echo '

'.$data_string.'

'; $output= curl_exec($ch); curl_close($ch); diff --git a/src/arenas/tictactoe/functions.php b/src/arenas/tictactoe/functions.php index e204453..2f85f4f 100644 --- a/src/arenas/tictactoe/functions.php +++ b/src/arenas/tictactoe/functions.php @@ -38,17 +38,7 @@ function get_IA_Response($iaUrl,$postParams){ //send params JSON as body $data_string = json_encode($postParams); - /* - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $iaUrl); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $postParams); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - $output = curl_exec($ch); - curl_close($ch); - - */ - + $ch = curl_init($iaUrl); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); @@ -59,6 +49,6 @@ function get_IA_Response($iaUrl,$postParams){ ); $output= curl_exec($ch); curl_close($ch); - + echo '

'.$data_string.'

'; return htmlentities($output); } \ No newline at end of file