PHP code example of jschwendener / zefix-php

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

    

jschwendener / zefix-php example snippets


use Jschwendener\Zefix\Zefix;

$zefix = new Jschwendener\Zefix\Zefix('username', 'password');

// Search for companies by name
$results = $zefix->company()->search('company name');

// Search for companies by name and additional parameters
$results = $zefix->company()->search('company name', [
    'canton' => 'ZH',
    'activeOnly' => false,
]);

use Jschwendener\Zefix\Zefix;

$zefix = new Jschwendener\Zefix\Zefix('username', 'password');

$details = $zefix->company()->getByUid('CHE-123.456.789');