When Curlopt_dns_use_global_cache is enabled, a global DNS cache is enabled, which is thread-safe and enabled by default.
Curlopt_dns_cache_timeout sets the time to save DNS information in memory by default of 120 seconds.
1) fopen/file_get_contents each request for data in the remote URL will be re-made to the DNS query, and the DNS information is not cached. However, Curl automatically caches the DNS information. Requests for Web pages or images under the same domain name require only one DNS query. This greatly reduces the number of DNS queries. So curl has a much better performance than fopen/file_get_contents.
2) fopen/file_get_contents is using Http_fopen_wrapper when requesting HTTP, and will not keeplive. and curl can. This makes curl more efficient when multiple links are requested more than once. (The header should be set)
So, such as internal needs constantly request intranet DNS server, try to add, with curl
or with DNSMASQ.
Curl DNS Cache Settings