title: Connect to online Magento from a localhost
body: <p>Beside setting up a custom Magento API, is there a way to connect from a localhost webapp to an online Magento installation? More specifically, I'm looking for a setup that will allow me to write codes like</p>
  
  <pre><code>include('app/Mage.php');    // how does this work for online-offline connection??
  $products = Mage::getModel('catalog/category')-&gt;load($category_id);
  </code></pre>
  
  <p>in a webapp running on localhost in our office. </p>
  
  <p>If this is not plausible, do I need to connect to the Magento store DB directly from my application and basically write my own queries? I would certainly create a new user with read-only access for the DB, if this was the case.</p>