I'm trying to execute a curl request using CURLOPT_RESOLVE but I get an error :
Warning: curl_setopt() [function.curl-setopt]: Invalid curl configuration option
This following line set the option :
curl_setopt($ch, CURLOPT_RESOLVE, 'example.com:443:127.0.0.1');
Any idea what's wrong ?
From the php.net doc:
An array of hostname, port, and IP address strings, each element separated by a colon. In the format: array("example.com:80:127.0.0.1")
So you can do that:
curl_setopt($ch, CURLOPT_RESOLVE, ['example.com:443:127.0.0.1']);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With