[RSS Feed/News] File upload via API

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
I want to add avatars to users via the xenforo api.

PHP:

Code:
function apiCall($action,$scope,$post,$upload=0) {
     $headers = array(
        'Content-type: application/x-www-form-urlencoded',
        'XF-Api-User: 1',
        'XF-Api-Key: '.APIKEY
     );
     if(!$upload) {
          $post = @http_build_query($post);
     }
     $url = 'https://127.0.0.1/api'.$scope;
     $ch = curl_init();
     if($upload) {
          $file = $post['avatar'];
          $mime =...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom