You could write a module where you implement [hook_cron()][1] to get the authentication ID and then store in the drupal DB (e.g. as variable via [variable_set()][2]). After that you can use it inside your templates without any worry. But you have to trigger your `cron.php` once a day via a sytem cron-job or the [poormanscron module][3]. For PHP xml-paring take a look at [SimpleXML][4].


  [1]: http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_cron/6
  [2]: http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/variable_set/6
  [3]: http://drupal.org/project/poormanscron
  [4]: http://php.net/manual/de/book.simplexml.php