If you want to generate the content of a block outside of Magento, you can do it using the following code snippet. I needed the content of the catalog.navigation.

 

//just include the Mage.php file inside your script
include '../app/Mage.php';
Mage::init();

$layout = Mage::app()->getLayout();
$layout->getUpdate()
	->addHandle('default')
	->load();
	
$layout->generateXml()
	     ->generateBlocks();
	
$menu = $layout->getBlock('catalog.topnav')->toHtml();
echo $menu;

 

Have fun coding ;)