Consider this code in a php file on my VPS server:
Try:
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
The above will prevent cURL from trying IPv6 first.