I bought a bunch of NTAG213 cards and have an ACR122U reader writer. I want to password protect each card with the same password, write a unique ID to each card, and use that ID to compare against a database in order to get an approval or declined response. I've studied the documentation and learned how the cards work via various tool, but my biggest question is, how do I actually send commands to the cards to read and write stuff in the system I'm thinking about creating? Is there a specific scripting tool or software I should be using to read and write or build upon?
Speaking about unique IDs, I've been told that each card has an ID, and that the pages that store the IDs can never be overwritten right? So is it safe to assume that if I bought one million NTAG213 cards, I'd never have to worry about a duplicate ID? If that is the case, is it possible for me to instead just write a program that reads the ID from each card and use that instead of writing an ID to each card? How can I get a program I'm writing to read that ID?
Sorry about bothering you guys with what may be a total beginner question, but I'm totally clueless and really want to learn. I'd really appreciate any help that I can get.
You should get in the habit of asking individual/specific questions on this site, it's not really a forum.
With that said...
How do I actually send commands to the cards to read and write stuff in the system I'm thinking about creating? Is there a specific scripting tool or software I should be using to read and write or build upon?
This is a "bad" question in that it's too broad for Stack Overflow. There are hundreds of tools available. Literally google "programming NFC" or something similar.
Speaking about unique IDs, I've been told that each card has an ID, and that the pages that store the IDs can never be overwritten right? So is it safe to assume that if I bought one million NTAG213 cards, I'd never have to worry about a duplicate ID?
This is a good question.
The ID can never be overwritten on most tags. Definitely not on the NTAG213.
Yes your reasoning is correct, but because the UIDs are not a standardised GUID/UID (e.g. Universally unique identifier - Wikipedia) and the IDs are set by manufacturers (and therefore are open to spoofing and perfectly legal situations where a manufacturer can produce 1 million tags with the same UID), there is no 100% guarantee, it is just statistically very unlikely and a practical assumption that you can make in most cases.
If that is the case, is it possible for me to instead just write a program that reads the ID from each card and use that instead of writing an ID to each card? How can I get a program I'm writing to read that ID?
Yes that approach is good, but I would consider adding another form of authentication too, because as discussed the tag IDs are not 100% unique. How to do it? It's a bit of a complex question, but if you're writing an Android app, you can simply use the getId() method with the nfc.Tag class Tag | Android Developers API.
I'm aware of the Luhn algorithm for validation of payment card numbers.
However, is there something similar that will tell me whether a particular card requires a start date or issue number, as these aren't universal?
Using this information, I would then show or hide the start date and/or issue number input boxes once a customer has entered their payment card number.
As far as I know, no there is no way to detect whether the expiry date (I assume that's what you meant by start date) is required based on the card number.
In these kind of situations (i.e. special cases for different cards), I've turned to this site as well as the backing data. With this data, you can get the bin of a credit card from the first 6-8 digits. I'm skeptical as to whether even the bin contains the data you are looking for, but good luck!
Just a note: be wary of the data since it is open source. In my experience it has been accurate, but make sure you keep that in mind. There are enterprise solutions to get bin data if accuracy is that important to you.
I found this record in the database which is used to hold multiple values.
I want to know what is this format called so that I know how to deal with it?
a:4:{s:5:"child";a:1:{s:0:"";a:1:{s:3:"rss";a:1:{i:0;a:6:{s:4:"data";s:1:" ";s:7:"attribs";a:1:{s:0:"";a:1:{s:7:"version";s:3:"2.0";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:1:{s:7:"channel";a:1:{i:0;a:6:{s:4:"data";s:29:" ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:5:{s:0:"";a:8:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:5:"yoast";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:16:"http://yoast.com";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:17:"tweaking websites";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:13:"lastbuilddate";a:1:{i:0;a:5:{s:4:"data";s:31:"fri, 30 mar 2012 09:19:49 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"language";a:1:{i:0;a:5:{s:4:"data";s:5:"en-us";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:9:"generator";a:1:{i:0;a:5:{s:4:"data";s:39:"http://wordpress.org/?v=3.4-alpha-19827";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:5:"image";a:1:{i:0;a:6:{s:4:"data";s:5:" ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:6:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:5:"yoast";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:3:"url";a:1:{i:0;a:5:{s:4:"data";s:69:"http://yoast.com/wp-content/themes/yoast-v2/images/yoast-logo-rss.png";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:16:"http://yoast.com";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:5:"width";a:1:{i:0;a:5:{s:4:"data";s:3:"144";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:6:"height";a:1:{i:0;a:5:{s:4:"data";s:3:"103";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:17:"tweaking websites";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}}s:4:"item";a:20:{i:0;a:6:{s:4:"data";s:15:" ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:7:{s:0:"";a:7:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:42:"7 ways to increase sales by creating trust";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:58:"http://feedproxy.google.com/~r/joostdevalk/~3/1ssu1jmtutq/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:69:"http://yoast.com/7-ways-to-increase-sales-by-creating-trust/#comments";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubdate";a:1:{i:0;a:5:{s:4:"data";s:31:"mon, 26 mar 2012 13:09:54 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"category";a:2:{i:0;a:5:{s:4:"data";s:22:"usability & conversion";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:1;a:5:{s:4:"data";s:28:"conversion rate optimization";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:25:"http://yoast.com/?p=45457";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"ispermalink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:778:"<p>the key to conversing a visitor into a client is the creation of trust. your product can be the greatest thing on earth or the dullest office supply ever, both can be sold online when your visitor knows you are the best supplier for that product or service. we often advise on how to gain [...]</p><p>7 ways to increase sales by creating trust is a post by <a rel="author" href="http://yoast.com/author/michiel/">michiel heijmans</a> on yoast - tweaking websites.a good wordpress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? check out my thoughts on wordpress hosting!</p>";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:16:"michiel heijmans";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:40:"http://purl.org/rss/1.0/modules/content/";a:1:{s:7:"encoded";a:1:{i:0;a:5:{s:4:"data";s:6576:"<p>the key to conversing a visitor into a client is the creation of trust. your product can be the greatest thing on earth or the dullest office supply ever, both can be sold online when your visitor knows you are the best supplier for that product or service.</p><p>we often advise on how to gain trust in our <a title="website review" href="http://yoast.com/hire-me/website-review/">website reviews</a>, and i've compiled a list of some of the advice we've given over time. of course, trust can be earned in more ways than this, but we'll give you these seven to start with.</p><h2>1. use clear and normal language</h2><p>this is an often overseen issue that causes a lot of misgrief with your visitors. you should speak their language, not drown them in a sea of technical specs you don't even understand yourself. use a clear and direct style of writing. keep your audience in mind. do not focus on telling them what you want to tell them, focus on providing as many arguments as possible why their quality of life improves after buying that specific product.</p><h2>2. testimonials</h2><p>do not brag about your products yourself. if your products or services are really that good, i'm sure you'll find someone else that can do the bragging for you. make sure your visitor understand that the testimonial is written by an actual customer, by listing at least name and company and if the customer agrees, even a picture of him. video seems to be the next big thing in testimonials, by the way. in my opinion, that video testimonial should be accompanied by a written excerpt:</p><div id="attachment_45461" class="wp-caption alignright" style="width: 590px"><img class="size-large wp-image-45461" title="testimonials as seen on cloversites.com" src="http://cdn2.yoast.com/wp-content/uploads/2012/03/testimonials-cloversites.com_-590x472.png" alt="testimonials as seen on cloversites.com" width="580" height="464" /><p class="wp-caption-text">testimonials as seen on cloversites.com</p></div><h2>3. verified signs</h2><p>everyone can create a verified sign, so don't let those verified signs fool you. but the majority of your visitors actually believe that you are the 'most appreciated hairdresser of mississippi' or the 'best plummer 2006'. man, i hate those signs. but when the signs are from well-known companies, they really do add value to a webshop:</p><div id="attachment_45459" class="wp-caption alignright" style="width: 590px"><img class="size-large wp-image-45459" title=""verified" signs" src="http://cdn2.yoast.com/wp-content/uploads/2012/03/verified-signs-dx.com_-590x76.png" alt=""verified" signs" width="580" height="74" /><p class="wp-caption-text">"verified" signs</p></div><p>by investing in the guidelines of the right verification companies â the webshop shows that it has been keeping the customer in mind when setting up the website.</p><h2>4. pictures</h2><p>if you recognize the woman on this picture, please call the following toll-free number...:</p><p><img class="alignright size-large wp-image-45460" title="stock photography" src="http://cdn2.yoast.com/wp-content/uploads/2012/03/picture-stock-590x314.png" alt="stock photography" width="580" height="308" /></p><p>you can do better than that stock photo. listing actual pictures of yourself and/or your employees pushes conversion due to recognition and identification.</p><h2>5. list your physical address</h2><p>this one is really simple: people want to know there is a place to go to in case of problems (if any). having an actual store next to your webshop works even better, especially if a lot of your customers are relatively local.</p><p>in the netherlands digitalstreet.nl made this concept into a huge success, even though they're located in the south-west of the netherlands (quite near to where we are), people come from all over the netherlands because they'd rather buy the product in the store. there are more stories like that, but even if you don't want to do that, just listing your address on check-out pages increases trust a lot.</p><h2>6. what happens after check-out?</h2><p>there's this hesitation in almost all buying decisions: right before you click the pay now button. what's going to happen next? am i charged for taxes, import, anything else? can i select a wrapping paper? explain what happens after clicking that button. that way the customer is included in your ordering process and there are absolutely no suprises. that can be done with just a few short lines of text:</p><p><img class="alignright size-large wp-image-45458" title="checkout message on bloomingdales.com" src="http://cdn.yoast.com/wp-content/uploads/2012/03/checkout-bloomingdales.com_-590x244.png" alt="checkout message on bloomingdales.com" width="580" height="239" /></p><h2>7. show you care about more than making money</h2><p>the most important thing is that your website has to reflect your believe in the product or service you provide. just a list of products is not enough. also tell your customer about your company, your main values or mission statement. i really love the 1% for the planet from yvon chouinard (patagonia) and craig mathews (blue ribbon flies) http://www.onepercentfortheplanet.org. next to showing that you are involved, it also creates a huge sympathy and trust factor.</p><h2>we'd love to hear your tips!</h2><p>if you are selling products or services on your website, you must have thought about this subject. i'm curious: what have you done on your website to increase trust? what are you going to do?</p><p>7 ways to increase sales by creating trust is a post by <a rel="author" href="http://yoast.com/author/michiel/">michiel heijmans</a> on yoast - tweaking websites.a good wordpress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? check out my thoughts on wordpress hosting!</p><img src="http://feeds.feedburner.com/~r/joostdevalk/~4/1ssu1jmtutq" height="1" width="1"/>";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:36:"http://wellformedweb.org/commentapi/";a:1:{s:10:"commentrss";a:1:{i:0;a:5:{s:4:"data";s:65:"http://yoast.com/7-ways-to-increase-sales-by-creating-trust/feed/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:38:"http://purl.org/rss/1.0/modules/slash/";a:1:{s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:2:"33";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:29:"http://search.yahoo.com/mrss/";a:2:{s:9:"thumbnail";a:1:{i:0;a:5:{s:4:"data";s:0:"";s:7:"attribs";a:1:{s:0:"";a:1:{s:3:"url";s:90:"http://cdn3.yoast.com/wp-content/uploads/2012/03/testimonials-cloversites.com_-125x125.png";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"content";a:4:{i:0;a:6:{s:4:"data";s:4:" ";s:7:"attribs";a:1:{s:0:"";a:2:{s:3:"url";s:81:"http://cdn.yoast.com/wp-content/upload73
It is a PHP serialized object, i.e. an object serialized with serialize() function: http://php.net/manual/en/function.serialize.php
For instance (from the manual):
class A {
public $one = 1;
public function show_one() {
echo $this->one;
}
}
$a = new A;
$s = serialize($a);
file_put_contents('store', $s);
Gives:
O:1:"A":1:{s:3:"one";i:1;}
You can use deserialize($sVarwiththeSerializedData) to revert it to the original state .
in our website www.theprinterdepo.com we are going to implement google checkout. However I am not sure in what shipping methods or strategy to use.
In this page:
https://developers.google.com/checkout/developer/Google_Checkout_XML_API_Carrier_Calculated_Shipping#Process
Google says that they calculate based on the total weight of the items, but the thing is if one person buys one printer thats fine, but if he orders 3 printers of 50lbs, the shipping cost is invalid calculating it with 150lbs. It has to be calculated as 3 packages of 50lbs.
How would you do it in this scenario??
I have only had minimal investigation to this, but I don't think this can be handled by default installation. I know that you would need a shipping extension that can support the Google API shipping-packages, but real issue is that not even the Google API can support more than one package, either by API limitation or restriction by choice.
The <shipping-packages> tag encapsulates information about
all of the packages that will be shipped to the buyer.
At this time, merchants may only specify one package per order
I would love to see this come to full use as it would be a great addition to be able to say that anything with a weight over x requires additional packaging but currently I don't think it is possible. While this can be accomplished by separating the order into three orders, but that will over complicate the user experience and possible cause loss of sales.
Source:
https://developers.google.com/checkout/developer/Google_Checkout_XML_API_Carrier_Calculated_Shipping#tag_shipping-packages
The "limitation" mentioned above is only if you will rely on Google to calculate shipping for you using what they call carrier-calculated-shipping.
You do have other options to calculate shipping:
you can pre-calculate using whatever formula (or shipping service/plugin) you have based on the cart contents (you would know this prior to handing off the cart to Google for Checkout), which is essentially sending a flat rate shipping cost to Google, or perhaps;
use the merchant-calculations-api option so you can account for the destination/delivery address (not just cart contents). This option is more complex (you need to handle callbacks from Google), but it does give you critical information to work with when calculating shipping.
hth....
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
The community reviewed whether to reopen this question 11 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
Is it even possible to perform address (physical, not e-mail) validation? It seems like the sheer number of address formats, even in the US alone, would make this a fairly difficult task. On the other hand it seems like a task that would be necessary for several business requirements.
Here's a free and sort of "outside the box" way to do it. Not 100% perfect, but it should reject blatantly non-existent addresses.
Submit the entire address to Google's geocoding web service. This service attempts to return the exact coordinates of the location you feed it, i.e. latitude and longitude.
In my experience if the address is invalid you will get a result of 602 from the service. There's definitely a possibility of false positives or false negatives, but used in conjunction with other consistency checks it could be useful.
(Yahoo's geocoding web service, on the other hand, will return the coordinates of the center of the town if the town exists but the rest of the address is bogus. Potentially useful as long as you pay close attention to the "precision" field in the result).
There are a number of good answers in here but most of them make the assumption that the user wants an "API" solution where they must write code to connect to a 3rd-party service and/or screen scrape the USPS. This is all well and good, but should be factored into the business requirements and costs associated with the implementation and then weighed against the desired benefits.
Depending upon the business requirements and the way that the data is received into the system, a real-time address processing solution may be the best bet. If a real-time solution is required, you will want to consider the license agreement and technical limitations of the Google Maps/Bing/Yahoo APIs. They typically limit the number of calls you can make each day. The USPS web tools API is the same in additional they restrict how/why you can use their system and how you are allowed to use the data thereafter.
At the same time, there are a handful of great service providers that can easily process a static list of addresses. Essentially, you give the service provider a CSV file or Excel file, they clean it up and get it back to you. It's a one-time deal with no long-term commitment or obligation—usually.
Full disclosure: I'm the founder of SmartyStreets. We do address verification for addresses within the United States. We are easily able to CASS certify a list and we also offer a address verification web service API. We have no hidden fees, contracts, or anything. You use our service until you no longer need it and you can walk away. (Unlike cell phone companies that require a contract.)
USPS has an address cleaner online, which someone has screen scraped into a poor man's webservice. However, if you're doing this often enough, it'd be a better idea to apply for a USPS account and call their own webservice.
I will refer you to my blog post - A lesson in address storage, I go into some of the techniques and algorithms used in the process of address validation. My key thought is "Don't be lazy with address storage, it will cause you nothing but headaches in the future!"
Also, there is another StackOverflow question that asks this question entitled How should international geographic addresses be stored in a relational database.
In the course of developing an in-house address verification service at a German company I used to work for I've come across a number of ways to tackle this issue. I'll do my best to sum up my findings below:
Free, Open Source Software
Clearly, the first approach anyone would take is an open-source one (like openstreetmap.org), which is never a bad idea. But whether or not you can really put this to good and reliable use depends very much on how much you need to rely on the results.
Addresses are an incredibly variable thing. Verifying U.S. addresses is not an easy task, but bearable, but once you're going for Europe, especially the U.K. with their extensive Postal Code system, the open-source approach will simply lack data.
Web Services / APIs
Enterprise-Class Software
Money gets it done, obviously. But not every business or developer can spend ~$0.15 per address lookup (that's $150 for 1,000 API requests) - a very expensive business model the vast majority of address validation APIs have implemented.
What I ended up integrating: streetlayer API
Since I was not willing to take on the programmatic approach of verifying address data manually I finally came to the conclusion that I was in need of an API with a price tag that would not make my boss want to fire me and still deliver solid and reliable international verification results.
Long story short, I ended up integrating an API built by apilayer, called "streetlayer API". I was easily convinced by a simple JSON integration, surprisingly accurate validation results and their developer-friendly pricing. Also, 100 requests/month are entirely free.
Hope this helps!
I have used the services of http://www.melissadata.com Their "address object" works very well. Its pricey, yes. But when you consider costs of writing your own solutions, the cost of dirty data in your application, returned mailers - lost sales, and the like - the costs can be justified.
For us-based address data my company has used GeoStan. It has bindings for C and Java (and we created a Perl binding). Note that it is a commercial product and isn't cheap. It is quite fast though (~300 addresses per second) and offers features like CASS certification (USPS bulk mail discount), DPV (Delivery point verification) flagging, and LON/LAT geocoding.
There is a Perl module Geo::PostalAddress, but it uses heuristics and doesn't have the other features mentioned for GeoStan.
Edit: some have mentioned 'doing it yourself', if you do decide to do this, a good source of information to start with is the US Census Tiger Data Set, which contains a lot of information about the US including address information.
As seen on reddit:
$address = urlencode('1600 Pennsylvania Avenue, Washington, DC');
$json = json_decode(file_get_contents("http://where.yahooapis.com/geocode?q=$address&flags=J"));
print_r($json);
Fixaddress.com service is available that provides following services,
1) Address Validation.
2) Address Correction.
3) Address spell correcting.
4) Correct addresses phonetic mistakes.
Fixaddress.com uses USPS and Tiger data as reference data.
For more detail visit below link,
http://www.fixaddress.com/
One area where address lookups have to be performed reliably is for VOIP E911 services. I know companies reliably using the following services for this:
Bandwidth.com 9-1-1 Access API MSAG Address Validation
MSAG = Master Street Address Guide
https://www.bandwidth.com/9-1-1/
SmartyStreet US Street Address API
https://smartystreets.com/docs/cloud/us-street-api
There are companies that provide this service. Service bureaus that deal with mass mailing will scrub an entire mailing list to that it's in the proper format, which results in a discount on postage. The USPS sells databases of address information that can be used to develop custom solutions. They also have lists of approved vendors who provide this kind of software and service.
There are some (but not many) packages that have APIs for hooking address validation into your software.
However, you're right that its a pretty nasty problem.
http://www.usps.com/ncsc/ziplookup/vendorslicensees.htm
As mentioned there are many services out there, if you are looking to truly validate the entire address then I highly recommend going with a Web Service type service to ensure that changes can quickly be recognized by your application.
In addition to the services listed above, webservice.net has this US Address Validation service. http://www.webservicex.net/WCF/ServiceDetails.aspx?SID=24
We have had success with Perfect Address.
Their database has all the US street names and street number ranges. Also acts as a pretty decent parser for free-form address fields, if you are lucky enough to have that kind of data.
Validating it is a valid address is one thing.
But if you're trying to validate a given person lives at a given address, your only almost-guarantee would be a test mail to the address, and even that is not certain if the person is organised or knows somebody at that address.
Otherwise people could just specify an arbitrary random address which they know exists and it would mean nothing to you.
The best you can do for immediate results is request the user send a photographed / scanned copy of the head of their bank statement or some other proof-of-recent-residence, because at least then they have to work harder to forget it, and forging said things show up easily with a basic level of image forensic analysis.
There is no global solution. For any given country it is at best rather tricky.
In the UK, the PostOffice controlls postal addresses, and can provide (at a cost) address information for validation purposes.
Government agencies also keep an extensive list of addresses, and these are centrally collated in the NLPG (National Land and Property Gazetteer).
Actually validating against these lists is very difficult. Most people don't even know exactly how their address as it is held by the PostOffice. Some businesses don't even know what number they are on a particular street.
Your best bet is to approach a company that specialises in this kind of thing.
Yahoo has also a Placemaker API. It is good only for locations but it has an universal id for all world locations.
It look that there is no standard in ISO list.
You could also try SAP's Data Quality solutions which are available in both a server platform is processing a large number of requests or as an embeddable SDK if you wanted to run it in process with your application. We use it in our application and it's very robust and scalable.
NAICS.com is coming out with an API that will add all kinds of key business data including street address. This would happen on the fly as your site's forms are processed. https://www.naics.com/business-intelligence-api/
You can try Pitney Bowes “IdentifyAddress” Api available at - https://identify.pitneybowes.com/
The service analyses and compares the input addresses against the known address databases around the world to output a standardized detail. It corrects addresses, adds missing postal information and formats it using the format preferred by the applicable postal authority. I also uses additional address databases so it can provide enhanced detail, including address quality, type of address, transliteration (such as from Chinese Kanji to Latin characters) and whether an address is validated to the premise/house number, street, or city level of reference information.
You will find a lot of samples and sdk available on the site and i found it extremely easy to integrate.
For US addresses you can require a valid state, and verify that the zip is valid. You could even check that the zip code is in the right state, but beyond that I don't think there are many tests you could run that wouldn't provide a lot of false negatives.
What are you trying to do -- prevent simple mistakes or enforcing some kind of identity check?