Notice: Use of undefined constant CURL_IPRESOLVE - assumed 'CURL_IPRESOLVE' Notice: Use of undefined constant CURL_IPRESOLVE - assumed 'CURL_IPRESOLVE' curl curl

Notice: Use of undefined constant CURL_IPRESOLVE - assumed 'CURL_IPRESOLVE'


you have to use CURL_IPRESOLVE_WHATEVER for both IP versions

curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER); 

More information refere this DOC


To use specifically IPv4, use

curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);

Official doc here: http://php.net/manual/en/function.curl-setopt.php