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

Mobile world congress - Key themes emerging

In the mobile devices, 3 key themes have emerged so far: 1. Foldable phone - Several companies has demonstrated foldable phones. For mains...