Bonjour,

Je suis débutant++ en PHP, j'ai besoin d'afficher le contenu d'un fichier xml distant:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<prayer> 
	<fajr>4:41</fajr> 
	<sunrise> 
6:35</sunrise> 
	<dhuhr> 
1:38</dhuhr> 
	<asr> 
5:31</asr> 
	<maghrib> 
8:39</maghrib> 
	<isha> 
10:27</isha> 
	<date>August 17, 2009</date> 
	<hijri>26 Shaban 1430</hijri> 
	<city>Sallanches</city> 
	<country>France</country> 
	<website>www.IslamicFinder.org</website> 
</prayer>
Mais mon script doit contenir une erreur :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
<?php $xml = simplexml_load_file('http://www.islamicfinder.org/prayer_service.php?country=france&city=sallanches&state=B9&zipcode=&latitude=45.9333&longitude=6.6333&timezone=1&HanfiShafi=1&pmethod=1&fajrTwilight1=10&fajrTwilight2=10&ishaTwilight=10&ishaInterval=30&dhuhrInterval=1&maghribInterval=1&dayLight=1&simpleFormat=xml');
print_r($xml->prayer->hijri);
?>
Pouvez-vous m'aidez, SVP ?