I use below code to bootstrap Magento in an external script, which works. As an example it gets the name of a specific product.
Is it possible to connect to another Magento database (on the same server) from such a script? If yes, how would I do this? I tried several things but didn't got a working end result.
<?php require_once '../app/Mage.php'; Mage::app(); $sku = 'product X'; $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku); var_dump($product->getName());