curl tauth

 $token=getApiToken();
//echo $token."<br>";
$authString = $uid.":".md5($uid.$token);
$authorizationValue = sprintf("Token %s", base64_encode($authString));
//echo $authorizationValue ."<br>";
//echo $url."<br>";

curl_setopt($ch, CURLOPT_HTTPHEADER, array("authorization: ".$authorizationValue));
原文地址:https://www.cnblogs.com/gaohuag/p/2359157.html