Re: VAT number validation

From: Date: Fri, 31 Oct 2008 11:15:38 +0000
Subject: Re: VAT number validation
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-282694@lists.php.net to get a copy of this message
On 31 Oct 2008, at 10:47, Koenraad Vanden Daele wrote:
Ther is a VAT number validation API. http://isvat.appspot.com/ How to use this; integrate it in PHP to validate VAT-numbers without the user experiencing anything?
Did you even have a go? Did you look at the PHP manual for clues as to how to make an HTTP request? Lucky for you I've used this API before so I already had a snippet so I dug it out and knocked up an example: http://dev.stut.net/php/validatevat.php Note that it's nowhere near production-quality code but it should give you a head start. Also note that this relies upon you having the allow_url_fopen configuration option enabled. If you don't then you could do this with curl or raw sockets. Again the manual is your friend. -Stut -- http://stut.net/

« previous php.general (#282694) next »