摘要: CURLOPT_DNS_USE_GLOBAL_CACHE 启用时会启用一个全局的DNS缓存,此项为线程安全的,并且默认启用。CURLOPT_DNS_CACHE_TIMEOUT 设置在内存中保存DNS信息的时间,默认为120秒。 1)fopen/file_get_contents 每次请求远程URL中 阅读全文
posted @ 2017-03-21 18:16 jking10 阅读(8202) 评论(1) 推荐(2) 编辑
摘要: 域名www.test.com解析内部多台ip $httpHeader = array('Host: www.test.com');$url = "10.17.2.245/xxx/xxx/t.php"; $ch = curl_init();curl_setopt($ch, CURLOPT_HTTPHEADER, $httpHeader);curl_setopt($ch, CURLOPT_UR... 阅读全文
posted @ 2017-03-21 18:09 jking10 阅读(17920) 评论(0) 推荐(0) 编辑