PHP code example of setono / gls-webservice-php-sdk

1. Go to this page and download the library: Download setono/gls-webservice-php-sdk 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/ */

    

setono / gls-webservice-php-sdk example snippets



use Setono\GLS\Webservice\Client\Client;
use Setono\GLS\Webservice\Factory\SoapClientFactory;
use Setono\GLS\Webservice\Model\ParcelShop;

$client = new Client(new SoapClientFactory('https://www.gls.dk/webservices_v4/wsShopFinder.asmx?WSDL'));

/** @var ParcelShop[] $parcelShops */
$parcelShops = $client->searchNearestParcelShops('Street', '12313', 'DK');
bash
$ composer