Is there an equivalent for curl --resolve .... in the PHP curl --resolve .... library?
Reference Information. I have a circular DNS (one domain name is allowed for several IP addresses) and I want to send a request to a specific host. I am using virtual hosts based on the apache name and therefore the correct domain name should appear in the HTTP request.
I tried to specify the IP address in the request URL: curl_setopt($ch, CURLOPT_URL, '127.0.0.1') and using curl_setopt($ch, CURLOPT_HTTPHEADER, 'Host: example.com') . It works for HTTP, but for HTTPS I get an SSL verification error (apparently CURL checks the certificate against the hostname URL and NOT Host: hostname).
Using the hosts not a convenient option.
source share