I have the url to web service which returns some xml data. I need to load this xml data and include only the value of the date tag on my site. How can this be done?
this is the url which returns xml:
<?xml version="1.0"?>
<prayer>
<fajr>4:12</fajr>
<sunrise>5:43</sunrise>
<dhuhr>1:03</dhuhr>
<asr>5:00</asr>
<maghrib>8:22</maghrib>
<isha>9:54</isha>
<date>July 21, 2012</date>
<hijri>2 Ramadan 1433</hijri>
<city>New York</city>
<country>Usa</country>
<website>www.IslamicFinder.org</website>
</prayer>
Try using PHP’s SimpleXMLElement
The NULL means we’re not passing any options. True means we’re getting the data from a URL. Check out the arguments here.