Matt.Denton;11007883 wrote:And finally... gethostbyname does NOT fail when using google.com. But it DOES FAIL for clients.mindbodyonline.com.
That's interesting; that suggests that at least some DNS resolution can take place.
One curiosity I note is 'clients.mindbodyonline.com' is really just an alias for 'clients_cdn.mindbodyonline.com' which is yet another alias for 'cs15.adn.edgecastcdn.net' where we finally reach an A record with an address of '72.21.92.35'.
What did the cURL error message look like when you tried to use the IP address instead? Note that you'd want to use [man]curl_setopt/man with the CURLOPT_HTTPHEADER option to define the 'Host' HTTP header since you're no longer using 'clients.mindbodyonline.com'. (This is why using the IP address in your browser won't work; the browser is still able to contact the server, but it no longer knows that it should tell the server it's trying to reach 'clients.mindbodyonline.com' - the same physical server is apparently hosting several virtual ones.)
Derokorian;11007901 wrote:Maybe it just sees the request as screen-scraping and is rejecting it because there is no browser-agent string?
Impossible - the cURL error is pointing to a DNS resolution issue, meaning that PHP wasn't even able to attempt to contact the remote server, let alone get rejected.