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

How to install PHP7.x, MySQL5.7 on Ubuntu 16.x

Open the terminal >sudo apt-get update >sudo apt-get install php-mbstring php7.0-mbstring php-gettext apache2 mysql-server-5.7 m...