PHP Curl CURLOPT_IPRESOLVE

谁说我不能喝 提交于 2019-11-28 12:00:38

Check you curl version

CURLOPT_IPRESOLVE is available since curl 7.10.8

Try this sample code to test

<?php

    $version = curl_version();

// These are the bitfields that can be used 
// to check for features in the curl build
$bitfields = Array(
            'CURL_VERSION_IPV6', 
            'CURLOPT_IPRESOLVE'
            );


foreach($bitfields as $feature)
{
    echo $feature . ($version['features'] & constant($feature) ? ' matches' : ' does not match');
    echo PHP_EOL;
}

FYI: http://gcov.php.net/PHP_5_3/lcov_html/curl/interface.c.gcov.php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!