$v) { $b[$k] = strtolower($v[$subkey]); } asort($b); foreach($b as $key=>$val) { $c[] = $a[$key]; } return $c; } $url = 'http://www.fig-docs.com/swisstiming/TEV/GR/DT_CUMULATIVE_RESULT-GRW024900.xml'; $rss_file = file_get_contents($url); // Si les XML ne sont pas sur le serveur if($rss_file==""){ echo"Results will be displayed here on April 21 at 13:00 local time!

"; } $xml = new SimpleXMLElement($rss_file) or die ("Results will be published in a minute"); ?>
2016 Aquece Rio Final Gymnastics Qualifier (Test Event) - Rhythmic Gymnastics Individual Qualification Live Results"; //$disc = $xml->Competition[0]->ExtendedInfos[0]->SportDescription[0]['DisciplineName']; //$apparatus = $xml->Competition[0]->ExtendedInfos[0]->SportDescription[0]['SubEventName']; //$subdiv = $xml->Competition[0]->ExtendedInfos[0]->ExtendedInfo[0]['Value']; //$rotation = $xml->Competition[0]->ExtendedInfos[0]->ExtendedInfo[1]['Value']; ?>
Competition[0]->Result[$i]['Rank']; $so = (string)$xml->Competition[0]->Result[$i]['SortOrder']; $point = (string)$xml->Competition[0]->Result[$i]['Result']; if($point == ""){ $lastname = ""; $NOC = ""; $id = ""; $score = ""; $diff = ""; $exec = ""; $pen = ""; }else{ $a=0; $id_profile = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->Description[0]['IFId']; $lastname = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->Description[0]['FamilyName']; $firstname = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->Description[0]['GivenName']; $NOC = (string)$xml->Competition[0]->Result[$i]->Competitor[0]['Organisation']; $app1 = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[0]['Value']; $app2 = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[1]['Value']; $app3 = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[2]['Value']; $app4 = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[3]['Value']; $tab_gym[$i]['hoop']['difficulty']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[0]->Extension[0]['Value']; $tab_gym[$i]['hoop']['execution']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[0]->Extension[1]['Value']; $tab_gym[$i]['hoop']['penality']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[0]->Extension[2]['Value']; $tab_gym[$i]['ball']['difficulty']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[1]->Extension[0]['Value']; $tab_gym[$i]['ball']['execution']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[1]->Extension[1]['Value']; $tab_gym[$i]['ball']['penality']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[1]->Extension[2]['Value']; $tab_gym[$i]['clubs']['difficulty']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[2]->Extension[0]['Value']; $tab_gym[$i]['clubs']['execution']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[2]->Extension[1]['Value']; $tab_gym[$i]['clubs']['penality']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[2]->Extension[2]['Value']; $tab_gym[$i]['ribbon']['difficulty']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[3]->Extension[0]['Value']; $tab_gym[$i]['ribbon']['execution']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[3]->Extension[1]['Value']; $tab_gym[$i]['ribbon']['penality']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[3]->Extension[2]['Value']; $tab_gym[$i]['place']=$place; $tab_gym[$i]['so']=$so; $tab_gym[$i]['note']=$point; $tab_gym[$i]['nom']=$lastname; $tab_gym[$i]['prenom']=$firstname; $tab_gym[$i]['pays']=$NOC; $tab_gym[$i]['app1']=$app1; $tab_gym[$i]['app2']=$app2; $tab_gym[$i]['app3']=$app3; $tab_gym[$i]['app4']=$app4; if($pen != "ACCEPTED" && $pen != "REJECTED"){ $tab_gym[$i]['pen']=$pen; } $tab_gym[$i]['id_profile'] = $id_profile; } } if($tab_gym != ""){ $tab_gym = subval_sort($tab_gym,'so'); } $i=0; while ($tab_gym[$i]['note'] != ""){ ?>
Rk Name NF Hoop Ball Clubs Ribbon Total