Skip to content

Instantly share code, notes, and snippets.

@epson121
Created September 24, 2014 10:00
Show Gist options
  • Save epson121/3ce8036288fed21e40f7 to your computer and use it in GitHub Desktop.
Save epson121/3ce8036288fed21e40f7 to your computer and use it in GitHub Desktop.
xmlrpc_test script
<?php
require_once('app/Mage.php');
$client = new Zend_XmlRpc_Client('----url----/api/xmlrpc/');
// If somestuff requires api authentification,
// we should get session token
$session = $client->call('login', array('username', 'password'));
$res = $client->call('call', array($session, 'catalog_product.info', 'id'));
// If you don't need the session anymore
var_dump($res);
$client->call('endSession', array($session));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment