I would look for the URL that is called to export a LSS inside the admin interface, then I would choose between Ajax or Curl depending on my needs/server configuration, then would choose a way to deal with authentication question reading the Yii documentation...