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-parsing take a look at [SimpleXML][4]. EDIT: Module creation: For this job it would be a simple module. Take a look at the [module-dev-guide][5]. First you create a [`YOURMODULE.info file`][6]. After that you put your code inside a `YOURMODULE.module` file. Than implement that `hook_cron()` like that: function YOURMODULE_cron() { update_news_service_id(); } function update_news_service_id() { // add your code here } One more comment: If you try to solve it this way you must consider calling `update_news_service_id()` from the template (or [`..._preprocess()`][7]) if you run into an expired service id-error. [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 [5]: http://drupal.org/node/206753 [6]: http://drupal.org/node/231036 [7]: http://api.drupal.org/api/drupal/includes--theme.inc/function/theme/6