cURL error 22: The requested URL returned error: 500 Internal Server Error