|
...
|
...
|
@@ -103,6 +103,7 @@ zFePUMXy1bFghAfzNKlrc5XgH4ixeeMh3cDtU97K |
|
|
|
return $this->http_click('get',$url,[],$this->headers);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :(发帖)post_send_msg
|
|
|
|
* @author :lyh
|
|
...
|
...
|
@@ -116,9 +117,30 @@ zFePUMXy1bFghAfzNKlrc5XgH4ixeeMh3cDtU97K |
|
|
|
$this->headers['Accept-Encoding'] = 'gzip';
|
|
|
|
$this->headers['Authorization'] = $this->headers['Authorization'].$api_key;
|
|
|
|
$url = $this->path.'/api/post';
|
|
|
|
return $this->http_click('posts',$url,$param,$this->headers);
|
|
|
|
return $this->http_post_ayr($url,$param,$api_key);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function http_post_ayr($url,$param,$api_key){
|
|
|
|
$curl = curl_init();
|
|
|
|
curl_setopt_array($curl, array(
|
|
|
|
CURLOPT_URL => $url,
|
|
|
|
CURLOPT_RETURNTRANSFER => true,
|
|
|
|
CURLOPT_ENCODING => '',
|
|
|
|
CURLOPT_MAXREDIRS => 10,
|
|
|
|
CURLOPT_TIMEOUT => 0,
|
|
|
|
CURLOPT_FOLLOWLOCATION => true,
|
|
|
|
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
|
|
|
CURLOPT_CUSTOMREQUEST => 'POST',
|
|
|
|
CURLOPT_POSTFIELDS => http_build_query($param),
|
|
|
|
CURLOPT_HTTPHEADER => array(
|
|
|
|
'Authorization: Bearer '.$api_key,
|
|
|
|
'Accept-Encoding: gzip'
|
|
|
|
),
|
|
|
|
));
|
|
|
|
$response = curl_exec($curl);
|
|
|
|
curl_close($curl);
|
|
|
|
echo $response;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @name :(上传图片或视频到ayr_share)post_media_upload
|
|
|
|
* @author :lyh
|
...
|
...
|
|