We've collected a range of sample code which you can use in your own applications and web sites
The code samples are grouped by the language / platform they're written for. If you have implemented Postcode Anywhere address lookups, bank validation checks, geodemographic lifestyle profiling, or any of our other services, and have sample code that might be helpful to other developers, let us know and we'll post it here.
Remember that Postcode Anywhere is actually written and operated in .NET so it offers the highest level of support possible. If you're developing in VS.NET, it's just a case of making a web reference to the relevant service and consuming the service. (Tip: if you're not using VS.NET you may find it easier to use our dataset service rather than the SOAP service.)
We have even built some .NET controls which you're welcome to hack apart and integrate into your software. These deal with all the UI plumbing and mean you can be up and running in seconds! Well, almost!
If you use .NET but don't like VB then these samples could be what you're looking for. Again, if you're developing in VS.NET, it's just a case of making a web reference to the relevant service and consuming the service.
Hooking in to Postcode Anywhere from ASP couldn't be easier. Sure, you can use our JavaScript service but if you want to do it properly, you can use Postcode Anywhere just like any other ADO datasource.
You don't need to learn any new tricks either - as long as you've got a working knowledge of ADO and know something about using recordsets, you can use the service. And you don't even need to install anything on the server!
-
ASP Address Finder
A simple example in ASP that lists the properties in a postcode and then returns a fully formatted address.
-
ASP Postcode Finder
Similar to the sample above, but this sample finds the postcode for a given address.
-
ASP Where's My Nearest?
A collection of pages that use the nearest service to geocode an existing database and provide flexible location based searching.
-
ASP ACORN Category Finder
Uses the Acorn service to get the Acorn type, category and group information for the postcode.
-
Objective 2 Checker
Simple but effective objective 2 eligibility checker for England and Wales. Even includes a map!
Postcode Anywhere may be written in .NET but that doesn't mean that we've forgotten all you VB 6 developers. In fact there aren't any features which are not available to you. Better still, you've got a huge range of integration options.
Take the easy route and use our DLLs which take care of everything or if you don't want to distribute any of our software you can use ADO or MSXML. It couldn't be easier!
-
Simple Form Completion
A VB6 project with different examples of integrating the address finder functionality. Uses a combination of the OCX control, UI forms and recordset service.
-
Postcode Finder
Similar to the sample above, but demonstrates the service finding postcodes instead of addresses.
So many of you plan to use Postcode Anywhere in MS Access that we've put together some samples of how to do it.
Take the easy route and use our DLLs which take care of everything or if you don't want to distribute any of our software you can use ADO or MSXML. It couldn't be easier!
-
Address Finder (on page)
This is the nicest way to integrate into Access. Our OCX control sits on your form and provides completely seamless searching.
-
Address Finder (using a dialogue)
By far the easiest way to integrate Postcode Anywhere into Access (apart from using the Recogniser of course). Just create a button, copy a bit of code and you're done!
-
Address Lookup Using Recordsets
If you don't want to use our OCX, DLL or desktop software, but still want to use our address lookups in Access then you can use our Recordset service.
So, you may be wondering how to integrate address lookups or bank validation checks (or any of our other services for that matter!) into your site if you don't want to use the popups and don't know that much about ASP or PHP and the like. Or maybe you only have a standard HTML site and don't want to use the popups. Well you're not being excluded. Try these JavaScript samples using AJAX to get an idea of what you can do.
We don't use it ourselves, but we know that many of you do. Our friends at Vigence have come up with this sample integration so that you can see how to use address lookups AND nearest store lookups using your CRM.
-
Address Lookup
Using a ByPostcode lookup followed by FetchAddress this introduces an address lookup feature into your CRM. Check the CRM configuration for the JavaScript to call the web services.
-
Nearest Store Locator
This lets you find stores that are nearest to a given postcode based on the data that's held in your CRM.
We're the first to admit we don't know that much about the ins and outs of PHP but here are some samples which other developers have sent in. If you think you can do better or have something that others may find useful then send it to us and we'll post it here.
-
General PHP Samples
PHP script samples which demonstrate different applications using all of our services.
-
PHP Where's My Nearest
A PHP sample using the StoredNearest method. Should be easy to adapt to other methods too!
-
PHP Soap
A PHP sample using the StoredNearest method. Should be easy to adapt to other methods too!
ColdFusion is something else we don't know much about. What we do know is that you can use CFHTTP to access our XML service, and this sample below shows you what to do next!
Like PHP and ColdFusion we don't know much about this whole retro Perl thing but hey... whatever floats your CGI boat. Here are a couple of samples sent in by other developers but feel free to send us your own examples!
A database for PCs and Macs? How's that work then?! Well we're not too sure but fellow developers have kindly let us post their samples of Postcode Anywhere in Filemaker.
The open source framework for interactive web applications that can be deployed on browsers, desktops and operating systems and still look the same. And you can integrate these applications with our services!
The JavaScript Yahoo! User Interface library contains components that let you build "richly interactive web applications". Here's one of those now.