PHP code example of daandesmedt / phpcrab

1. Go to this page and download the library: Download daandesmedt/phpcrab 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/ */

    

daandesmedt / phpcrab example snippets


 

andesmedt\CRAB\CRAB;
use daandesmedt\CRAB\ws\WSCRAB;

$wscrab = new WSCRAB();
$res = $wscrab->listAardAdressen();
var_dump($res);

 

andesmedt\CRAB\tools\CRABTools;

$crabtools = new CRABTools();
$res = $crabtools->getAddressLocation(10);
var_dump($res);

 

andesmedt\CRAB\CRAB;
use daandesmedt\CRAB\ws\WSCRAB;

$wscrab = new WSCRAB();
try {
    $res = $wscrab->getWegsegmentByIdentificatorWegsegment('124384');
} catch (CRABServiceException $e) {
    var_dump($e->getMessage());
}