Re: [PHP] VAT number validation
- From: stuttle@xxxxxxxxx (Stut)
- Date: Fri, 31 Oct 2008 11:15:38 +0000
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/
.
- References:
- VAT number validation
- From: "Koenraad Vanden Daele"
- VAT number validation
- Prev by Date: VAT number validation
- Next by Date: Reg Ex
- Previous by thread: VAT number validation
- Next by thread: Reg Ex
- Index(es):