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 ?
"Could not resolve host: api.wmspanel.com" means your dns on the server cannot resolver api.wmspanel.com host name. Please setup server correctly. You can try to access any other public web resource to check your server setup e.g curl -vvv https://wmspanel.com
This website or its third-party tools use cookies, which are necessary to its functioning
and required to achieve the purposes illustrated in the
Privacy Policy.
If you want to know more or withdraw your consent to all or some of the cookies, please
refer to the
Privacy Policy.
By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise,
you agree to the use of cookies.