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 27 28 29 30
|
<?php
$data = array('cal_saison'=>'2017/2018','cal_codent'=>'ABCCS','cal_codpoule'=>'EFA','typ_edition'=>'E','type'=>'RES','rech_equipe'=>'');
$ch = curl_init('http://www.ffvbbeach.org/ffvbapp/resu/vbspo_calendrier_export.php');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch,CURLOPT_HEADER,0);
$result = curl_exec($ch);
curl_close($ch);
//----- Transformation du résultat en un tableau HTML
$lignes = explode("\r\n",$result);
if (count($lignes) == 1)
{
$lignes = explode("\n",$result);
}
?>
<table border="1"><?php
foreach($lignes as $key => $ligne)
{?>
<tr>
<td><?php
print str_replace(";" ,"</td><td>" ,$ligne);?>
</td>
</tr><?php
}?>
</table> |
Partager