<?php
require_once("euvatchecker_class.php");
$vat = new EUVATChecker("data_vat.xml", "error_vat.xml", "ok_vat.xml", "dk");
#OK $vatno = "DK28 61 53 37";
#NO OK $vatno = "DK26 61 53 37";
$vatno = "DK28 61 53 37";
if($vat->check($vatno)){
//RETURNS THE OK TXT
echo $vat->getResult();
echo " : ";
//RETURNS THE COUNTRY
echo ucfirst($vat->getPays($vatno));
}else{
//RETURS THE ERROR TXT
echo $vat->getLastError();
};
?>
|