我阅读了整个 API,但仍然存在身份验证问题
$url = "api.domainapi.com/v1/availability/example.com";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, 'login:password');
curl_exec($ch);
错误:
HTTP Status 401 -
type Status report
message
description This request requires HTTP authentication ().
谁能向我解释如何成功验证(我收到验证错误)?