PHP Classes

File: vat_test.php

Recommend this page to a friend!
  Classes of Benjamin Boigienman   VAT Checker   vat_test.php   Download  
File: vat_test.php
Role: Example script
Content type: text/plain
Description: Test
Class: VAT Checker
Check if a European VAT number is valid
Author: By
Last change:
Date: 18 years ago
Size: 260 bytes
 

Contents

Class file image Download
require_once("vatchecker_class.php");

$vat = new VATChecker("data_vat.xml", "error_vat.xml", "fr");

$vatno = "FR88 331 121 327";

if($vat->check($vatno))
    echo "numéro valide (".ucfirst($vat->getPays($vatno)).")";
else
    echo $vat->getLastError();