Skip to content

Instantly share code, notes, and snippets.

@aguimaraes
Created October 1, 2009 19:03
Show Gist options
  • Save aguimaraes/199164 to your computer and use it in GitHub Desktop.
Save aguimaraes/199164 to your computer and use it in GitHub Desktop.
class IndexController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
$client = new Zend_XmlRpc_Client('http://192.168.0.6/alvaro/magento/api/xmlrpc/');
$session = $client->call('login', array('magento', 'micro123'));
$products = $client->call('call', array($session, 'product.list'));
$client->call('endSession', array($session));
/* $products contém todos os produtos */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment