I only just learned about LanguageTool and saw that there is a HTTP API. Testing it out in my browser works fine but when I try send a POST request with curl I keep getting a “503 Service Unavailable”.
Does anyone know what I’m doing wrong? Am I missing something?
I’m using PHP.
$url = 'https://languagetool.org:8081/'; $payload = 'language=en-US&text=a+simple+test'; // Send $curl = curl_init($url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSLVERSION, 3); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $payload); $response = curl_exec($curl);
I’m not very experienced with curl but even doing a file_get_contents() doesn’t work.