Click here to Skip to main content
15,901,666 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

friends could you please help me to verify the entered postal-code and want to find the corresponding location from the zipcode.
Posted
Updated 18-Nov-11 5:27am
v2
Comments
[no name] 18-Nov-11 11:41am    
What part of this are you having difficulties with?
Mayjo Antony 18-Nov-11 12:43pm    
that when i entered a zipcode (mainly in india) in the webpage. it should verify the zipcode and wants to get the name of the place that corresponds to the entered zipcode.

1 solution

You can find some Web service which holds a database of postal addresses or other geographic information you need and provides search by zip code. For example:
http://www.webservicex.net/uszip.asmx[^],
http://developer.yahoo.com/search/local/V3/localSearch.html[^].

For some services (if I'm not much mistaken, Yahoo is one of them), you need to sing up and authenticate before use.

For using Web Services with PHP, see http://www.urdalen.no/wsdl2php/manual.php[^] which will create you a proxy be WSDL file which you need to obtain from the provider of the service. You will need to use the proxy classes directly in your PHP scrip.

See also "How to easily consume a web service from PHP": http://stackoverflow.com/questions/4430/how-to-easily-consume-a-web-service-from-php[^].

—SA
 
Share this answer
 
v2
Comments
Mayjo Antony 18-Nov-11 12:38pm    
thanx for the fast response. i have one more doubt that how to use the proxy classes directly in my php script.
Sergey Alexandrovich Kryukov 18-Nov-11 12:55pm    
You are welcome.
WSDL2PHP should generate you proxy in the form of PHP source code. When you generate it you will see. Usually the generated classes are pretty much self-explanatory. If you know the basic semantic of a particular Web Service, you know what to expect. Maybe you will be able to see some usage sample, not necessarily for PHP.

Good luck, call again.
--SA
Mayjo Antony 18-Nov-11 13:06pm    
thanx.. for the clarification.
guyz like you, are the inspiration for me to do more works on php.
once again thanx a lot.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900