title: Magento - Fetch current domain and not base domain
body: <p>We are running one Magento install over multiple domains and are using a script to fetch information from the database to help users filter the products.</p>
  
  <p>In our coding we have the <code>$_SERVER</code> function calling the store which seems to be store 1 (which is on domain 1), I was wondering what I would need to change to fetch the information from store 2 (which is on domain 2).</p>