How to create cms pages dynamically

Here is code for CMS Pages dynamically….

$magentoCms = array(
‘title’ => ‘Magento CMS Page’,
‘identifier’ => ‘magento-cms’,
‘content’ => ‘Magento CMS Page Magento CMS Page Magento CMS Page Magento CMS Page’,
‘is_active’ => 1,
‘sort_order’ => 0,
‘stores’ => array(0),
‘root_template’ => ‘three_columns’
);

Mage::getModel(‘cms/page’)->setData($magentoCms)->save();

Hope it will work.