I
I
Ilgiz Khamitov2017-01-16 17:01:25
PHP
Ilgiz Khamitov, 2017-01-16 17:01:25

I can't use IPV6 in CURLOPT_INTERFACE, how can I fix it?

I'm trying to use IPV6, but it doesn't work. Gives an error message.

$uCurl = curl_init('http://www.whatismyipv6.com');

curl_setopt ($uCurl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt ($uCurl, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($uCurl, CURLOPT_TIMEOUT, 10);

curl_setopt($uCurl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
curl_setopt($uCurl, CURLOPT_INTERFACE, '7a01:441:7:6::1a');
$uResponse = curl_exec ($uCurl);
curl_close ($uCurl);

echo curl_error ($uCurl);


Failed connect to www.whatismyipv6.com:80; No route to host

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question