php curl CURLOPT_PASSWDFUNCTION选项

Hay*_*ate 1 php security curl

我不能使用php的curl选项CURLOPT_PASSWDFUNCTION,得到通知:

PHP Notice:  Use of undefined constant CURLOPT_PASSWDFUNCTION - assumed 'CURLOPT_PASSWDFUNCTION'
Run Code Online (Sandbox Code Playgroud)

样品:

function get_passwd($ch, $string, $length){
    return 'password';
}
curl_setopt($ch, CURLOPT_PASSWDFUNCTION, 'get_passwd');
Run Code Online (Sandbox Code Playgroud)

PHP信息:

PHP 5.4.40(cli)(建于2015年4月29日02:17:51)版权所有(c)1997-2014 PHP Group Zend Engine v2.4.0,版权所有(c)1998-2014 Zend Technologies

我做错了什么?

UPD:curl正在工作,当我执行我的代码时,我收到消息"请输入密码",我输入密码并使用ecnryption和证书通过ssl获取数据.我想避免手动输入密码.

Lev*_*evB 5

似乎已删除此功能:

CURLOPT_PASSWDFUNCTION
在7.4.2中引入
自7.11.1以来已弃用
最后一次在7.11.1中使用

最新的卷曲发布是7.42.1