function exportAction()
 {
     $this->checkVersion();
     if (isset($_REQUEST['go'])) {
         if (isset($_REQUEST['format']) && 'csv' == $_REQUEST['format']) {
             header(sprintf('Content-Disposition: attachment;filename="vaf-export-%s.csv"', time()));
             $stream = fopen("php://output", 'w');
             $sitemap = new Elite_Vafsitemap_Model_Sitemap_Product_GoogleBase($this->config());
             $sitemap->csv($_GET['store'], $stream);
             exit;
         } else {
             $sitemap = new Elite_Vafsitemap_Model_Sitemap_Product_XML($this->config());
             $size = $sitemap->productCount();
             $files = array();
             $chunkSize = 50000;
             $basePath = Mage::getBaseDir() . '/var/vaf-sitemap-xml';
             if (file_exists($basePath)) {
                 $this->recursiveDelete($basePath);
             }
             mkdir($basePath);
             for ($i = 0; $i <= $size; $i += $chunkSize) {
                 $xml = $sitemap->xml($_GET['store'], $i == 0 ? 0 : $i + 1, $i + $chunkSize);
                 $file = $basePath . '/' . floor($i / $chunkSize) . '.xml';
                 array_push($files, basename($file));
                 file_put_contents($file, $xml);
             }
             file_put_contents($basePath . '/sitemap-index.xml', $sitemap->sitemapIndex($files));
             echo 'Sitemap created to ' . $basePath;
             exit;
         }
     }
     $this->loadLayout();
     $this->_setActiveMenu('vaf/export');
     $block = $this->getLayout()->createBlock('adminhtml/template', 'vafsitemap_export')->setTemplate('vf/vafsitemap/export.phtml');
     $this->_addContent($block);
     $this->renderLayout();
 }
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Vehicle Fits to newer
 * versions in the future. If you wish to customize Vehicle Fits for your
 * needs please refer to http://www.vehiclefits.com for more information.
 * @copyright  Copyright (c) 2013 Vehicle Fits, llc
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
// Edit: set paths as neccessary
require_once dirname(__FILE__) . '/../Vaf/bootstrap.php';
require_once '../../../../Mage.php';
// Edit: set to store ID to run export for
$storeId = 1;
// Edit: Set to database credentials (should match app/etc/local.xml and empty cache)
$params = array('host' => '', 'username' => 'root', 'password' => 'vaf', 'dbname' => 'vaf');
// DO NOT EDIT BELOW HERE
// DO NOT EDIT BELOW HERE
// DO NOT EDIT BELOW HERE
$db = Zend_Db::factory('pdo_mysql', $params);
$db->getConnection();
Zend_Registry::set('db', $db);
$sitemap = new Elite_Vafsitemap_Model_Sitemap_Product_GoogleBase();
$csv = $sitemap->csv($storeId, true);
$file = 'google-base-store-' . $storeId . '.csv';
file_put_contents($file, $csv);
echo 'sitemap saved to ' . $file;
exit;
<?php

$storeId = 1;
// Edit: set to store ID to run export for
require_once 'config.php';
$stream = fopen("php://output", 'w');
$sitemap = new Elite_Vafsitemap_Model_Sitemap_Product_GoogleBase();
$sitemap->csv($storeId, $stream);