The usage of the host cannot be resolved using curl: & nbsp; 1. two local networks can be connected to the Internet. Use HTTP to obtain data from the remote server. & Nbsp; 2. any CURL can work normally. & Nbsp; problem: & nbsp; When a network is connected to work normally, unplug the network cable and change to another network. when the device is not closed and request data from the server, the system prompts that the master curl cannot be resolved and the host cannot be resolved.
Usage:
1. two local networks can be connected to the Internet. Use HTTP to obtain data from the remote server.
2. any CURL can work properly.
Problem:
After a network connection works properly, unplug the network cable and change it to another network. when the device is disabled and request data from the server, the system prompts that the host cannot be parsed.
However, if the network cable is inserted back at this time, CURL can resolve the host properly and work properly.
So I want to check whether it is a CURL. after The DNS is cached and the network cable is changed, the previous data is used.
However, my code uses curl_easy_cleanup, curl_global_cleanup,
Crul_easy_setopt (curl, CURLOPT_FRESH_CONNECT, 1) is added)
Curl_easy_setopt (curl, CURLOPT_FORBID_REUSE, 1)
Curl_easy_setopt (curl, CURLOPT_DNS_USE_GLOBAL_CACHE, 0)
These are useless. Who knows what to do?
------ Solution --------------------
This problem may be caused by many problems.
1. what do two local networks mean? Gateway issues different accesses to the Internet
2. the firewall may affect everything.
3. idenfy and session may be different.
------ Solution --------------------
The most comprehensive Chinese manual for the CURL function library in PHP
Http://hi.baidu.com/382262106/blog/item/a68694012db59f017aec2c6d.html
------ Solution --------------------
Discussion
The most comprehensive Chinese manual for the CURL function library in PHP
Http://hi.baidu.com/382262106/blog/item/a68694012db59f017aec2c6d.html