I'm trying to do a curl post from php:
https://api.wmspanel.com/v1/realtime_data?client_id=aaa&api_key=bbbb&data_slice=ccc
These are the options:
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $hashesJson);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($hashesJson))
);
$hashesJson is json string.
I get the following error on the server:
Could not resolve host: api.wmspanel.com
P.S.:
If I try to do a call in the browser like this:
https://api.wmspanel.com/v1/routes?client_id=aaa&api_key=bb
The api responds correctly.
The ip of the server is whitelisted.
Any ideas why ?