Monday, October 26, 2009

Yahoo Geocode API,REST calls and PHP

While using Yahoo!’s Geocoding API web services if we are not specifying any output format default xml output will be provided. When we query this web service using REST calls with file_get_contents(), which is a php function to get the contents of a file, file_get_contents of your query will print you a string as an output. But php treat this in a strange manner as we could not use string functions on this output such as substr() however it will print the XML tag for $Output[0]....etc and so on. So it is better to specify output format as php will give you a
serialized php, which you can unserialize it and use as an array output.

No comments:

Post a Comment

Saving agility from scrum: Accelerate book summary

Recently, I came across a post in our internal developer channel on shortcomings of scrum which they were facing in their project. Scrum ...