PHP Curl Slowness PHP Curl Slowness curl curl

PHP Curl Slowness


CURL has some problems with DNS look-ups. Try using IP address instead of domain name.


Curl has the ability to tell exactly how long each piece took and where the slowness is (name lookup, connect, transfer time). Use curl_getinfo (http://www.php.net/manual/en/function.curl-getinfo.php) after you run curl_exec.

If curl is slow, it is generally not the PHP code, it's almost always network related.


try this

curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );