Skip to content

A composer php library with a class containing many easy-to-use methods for querying cvrapi.dk in your php application.

Notifications You must be signed in to change notification settings

kevinfrom/cvr-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CvrApi php library

Installation

Install through composer:

composer require kevinfrom/cvr-api

PHP Examples

Initializing the api

use \kevinfrom\CvrApi\CvrApi;

$cvrApi = new CvrApi();

Country

By default, the API searches for Denmark, but you can change this if you would like:

$cvrApi = new CvrApi('de');

SSL/HTTPS

By default, SSL/HTTPS is enabled for the API request, but you can disable this if you would like:

$cvrApi = new CvrApi('dk', true);

Query search

Search using query:

$result = $cvrApi->search('Kevin From');

Search by name

Seach by name:

$result = $cvrApi->searchByName('Kevin From');

Search by VAT

Search by VAT (integer):

$result = $cvrApi->searchByVat(39090325);

or string:

$result = $cvrApi->searchByVat('39090325');

Search by CVR

This is an alias to "Search by VAT".

Search by CVR (integer):

$result = $cvrApi->searchByCvr(39090325);

or string:

$result = $cvrApi->searchByCvr('39090325');

Search by production unit

Search by production unit:

$result = $cvrApi->searchByProductionUnit(1025204855);

Search by phone

Search by phone:

$result = $cvrApi->searchByPhone(51927117);

About

A composer php library with a class containing many easy-to-use methods for querying cvrapi.dk in your php application.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages