curl basic认证

curl_setopt ( $curl, CURLOPT_USERPWD, '用户名:密码' );
原文地址:https://www.cnblogs.com/gaohuag/p/2233077.html