Posts

Showing posts from April, 2012

Getting latitude, longitude, timezone using ip address.

This is a post to find the latitude, longitude, timezone, country, city and so on using the web services/api by ipinfodb. The ipinfodb provides api in both xml and json format. We can use either of them. I will show you how to use it for both formats. Using XML format: You can either register for api key from ipinfodb. I am using mine in this example.

How to parse a XML file using SimpleXML in PHP5?

SimpleXML is a very simple function introduced in PHP5 to parse a XML file. It is very simple to use and implement as compared to other bulky codes to parse a XML file. The steps are pretty simple. Let us use a simple XML file as below naming it as xmltest.xml.