There are a couple of things to check. I don’t write much JS but your jquery example looks like it’s making a GET request rather than a POST request, so try putting your variables on the end of the URL and using GET from PHP?

Also try checking if you get anything from curl_error($ch) as if the server has any more information, you will find it here.

Hope that helps, and good luck!