PHP code example of lightools / ares
1. Go to this page and download the library: Download lightools/ares 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/ */
lightools / ares example snippets
$client = new Bitbang\Http\Clients\CurlClient(); // you will probably need to setup CURLOPT_CAINFO or CURLOPT_SSL_VERIFYPEER
$loader = new Lightools\Xml\XmlLoader();
$finder = new Lightools\Ares\CompanyFinder($client, $loader);
try {
$company = $finder->find('66872944');
if ($company === NULL) {
// not found
} else {
echo $company->getVatNumber();
}
} catch (Lightools\Ares\LookupFailedException $e) {
// process exception
}