How to programmatically set the front page? I want to set the Drupal front page programmatically at run time.
How can I do this? Is this possible?
You can use variable_set() for that.

variable_set('site_frontpage', $value);