Okay, that would be great!
Main Topics
Browse All TopicsHello,
I have a field where someone fills out their physical address and then it goes into the db.
The problem I am having is that google is not allowing some of these addresses to be accepted into the google base as it claims they are invalid.
Here is an example of some that are 'invalid'
10910 Braemor Dr., Haslet, TX, 76052, USA
1310E 700S, Wolcottville, IN, 46795, USA
Od Chula Road, Amelia Court House, VA, 23002, USA
401 Pinehurst Ave., Portland, TX, 78374, USA
1005 Lake Shadow Dr., Dallas, NC, 28034, USA
Do you know what makes these invalid and if so do you have a solution so that I can 'validate' them before they get submitted?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
This has been very helpful, I was able to correct most of the addresses by running them through your code!
I do have one question, I have attached a code and I was wondering if it was possible for it to spit out the corrected address if it was or was not corrected.
I played with it a bit but ended up reverting most of my changes, I am not good at arrays.
Any help would be great!
Sure. See lines 103 thru 107. You should be able to access these properties of the SimpleGeoCoder object to get the normalized address. Then you can compare those fields to the initial values and if they are not equal, the GeoCoder has normalized the address for you. Normalized addresses are (IIRC) always upper case, so you might want to factor that into your comparisons.
For example, you set the state on line 17. After calling the SimpleGeoCoder and getting a good answer, you might do something like this:
if (strtoupper($s) == $demo->state) echo "STATE IS NOT CHANGED";
Well I am not having any luck, when I plug it in it is saying that there are no items in the rss.
QUOTE:
XML Parsing Error: no element found
Location: http://www.example.com/r
Line Number 1, Column 1:
END QUOTE
I am plugging in code 1 into code 2 and I get code 3 which does not work, do I have to treat it differently because of the xml encoding?
This is a pain but its really seaming to come together quickly, I did not even know you could do something like this.
I have attached my most advanced code.
Thanks for any pointers
Fairly sure we are not looking at the code you're using now - the error message from the most recent code snippet could not have occurred on line 69. Going forward, it's a good idea to make sure that the questions and the posted code always match, otherwise we are just guessing at what might be wrong.
Anyway, this seems to have morphed from a question about verifying physical addresses, which I answered to the best of my ability, into something about RSS and include paths, so I will sign off for now.
Best regards, ~Ray
Business Accounts
Answer for Membership
by: Ray_PaseurPosted on 2009-10-31 at 17:05:03ID: 25712120
You might try running these through a geocoder to get a normalized address. I'll post a code sample in a moment.