Skip to content

Instantly share code, notes, and snippets.

@seriousManual
seriousManual / packstations.php
Last active February 1, 2021 15:14
Minimal code example for a SOAP call to the DHL API (Packstations search)
<?php
$userName = 'fooUser';
$password = 'fooPassword';
$endpoint = 'https://cig.dhl.de/services/sandbox/soap';
$client = new SoapClient("https://cig.dhl.de/cig-wsdls/com/dpdhl/wsdl/standortsuche-api/1.0/standortsuche-api-1.0.wsdl", [
'login' => $userName,
'password' => $password,
'location' => $endpoint,