[SimpleXML] Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "
Bonjour à tous,
J'ai un souci pour parser un document xml :
Citation:
Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "
Citation:
"<?xml version="1.0" encoding="UTF-8"?><intranet> <session> <sessionId>000001369BDBAF5A</sessionId> <ipAddress>85.23.200.22</ipAddress> <creationDate>1334054727521</creationDate> <modificationDate>1334054727521</modificationDate> <accessingDate>1334055809750</accessingDate> <sessionTimeout>1800000</sessionTimeout> <keepAliveTimeout>300000</keepAliveTimeout> <user access="yes" iup="AG3309"> <source>1</source> <username>xmx</username> <identity access="yes"> <source>5</source> <matricule>personnel:32589</matricule> <titre>M.</ti in /home/web998/public_html/Etudiants/index.php on line 20
La ligne 20 :
Code:
1 2
|
$xmlFichier = simplexml_load_file($coutput ); |
Et voici le code dans son entièreté :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| session_start();
//var_dump($_GET);
//récupère les paramètres transmis par l'intranet
//
$sid = $_GET['_sid'];
$uid = $_GET['_uid'];
$url = "https://www.muh.ac.be/commons/check?_type=normal&_sid=" . $sid . '&_uid=' . $uid;
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$coutput = curl_exec($ch);
curl_close($ch);
$xmlFichier = simplexml_load_file($coutput );
echo "<hr/>";
foreach ($xmlFichier->session->user as $item)
{
echo $item->matricule.'<br/>';
} |
Merci d'avance pour votre aide.
beegees