PHP code example of webgriffe / amp-magento-soap-client

1. Go to this page and download the library: Download webgriffe/amp-magento-soap-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webgriffe / amp-magento-soap-client example snippets




Loop::run(function () {
    /** @var \Webgriffe\AmpMagentoSoapClient\Client $client */
    $client = yield (new \Webgriffe\AmpMagentoSoapClient\Factory(
        'http://magento.host/api/soap/?wsdl',
        'username',
        'password',
        '8.8.8.8' // Optional nameserver IP
    ))->create();

    yield $client->login();
    $result = yield $client->call('catalog_product.list', []);
    var_dump($result);
});