title: Magento get compare URL by product id’s
body: <p>I am looking for the URL which automatically compare the product after passing ids or SKU to the url</p>
  
  <p>Currently in magento after clicked on compare button the compare popup URL is like below:</p>
  
  <p><strong>yoursite/index.php/catalog/product_compare/index/</strong></p>
  
  <p>So I required the URL which automatically compares the products after passing the params to it?</p>
  
  <p>Is there any way present by default in magento or I have to do this programmatically?</p>