I'm noticing that the PHP wrapper using cURL is very slow. On a local version of Apache with PHP it takes about 15 seconds to get the response but the same api call made in a browser gets it in milliseconds.
I've been reading some forums and it seems under some scenarios cURL takes a long time resolving DNS
Is it safe to change the $host from api.createsend.com to 22.214.171.124 or it's not a fixed IP?
Any other way to speed up the API call in PHP ?
UPDATE: Changing to IP and HTTP (not S) is still taking around 8 seconds and the browser still takes less than half a second. This is not in a shared hosting environment, it's in my own computer both test so I don't know why PHP takes so long. The PHP only calls the API and outputs the content, there's nothing else going on.
From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that drive real business results.Get started for free