$data = array( 'action' => 'query', 'theme' => $theme, // Theme du chat 'prompt' => $prompt, // Qu'est-ce que OAuthSD ? 'detail' => 'Normal', 'history' => $history, 'language' => "Français" ); $h = curl_init("localhost:5002/api/post"); # local curl_setopt($h, CURLOPT_POST, 1); curl_setopt($h, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt($h, CURLOPT_RETURNTRANSFER, 1); curl_setopt($h, CURLOPT_TIMEOUT, 100); // 100 secondes $result = curl_exec($h);