bonjour
je voudrais afficher le résultat d'une commande en CURL en pdf en incrémentant le résultat mais cela ne m'affiche rien voici le code
f(isset($_POST["Import"])){
$filename=$_FILES["file"]["tmp_name"];
if($_FILES["file"]["size"] > 0)
{
$file = fopen($filename, "r");
while (($getData = fgetcsv($file, 10000, ",")) !== FALSE)
{
$data = array(
'id' =>$getData[0] ,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://.............');
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
$result = curl_exec($ch);
$json = json_decode($result, true);
// Lecture des lignes du fichier
//$pdf = new PDF();
//$pdf->AliasNbPages();
//$pdf->AddPage();
//$pdf->SetFont('Times','',12);
//$pdf->Ln(20);
//$pdf->Cell(70,10,'mail etudiant',1,0);
//$pdf->Cell(70,10,'mot de passe',1,1);
//$pdf->Cell(70,10, $getData[0],1,0);
//$pdf->Cell(70,10,$json['password'],1,1);
//$pdf->Output();
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times','',12);
$pdf->Ln(20);
//$pdf->Cell(70,10,'mail etudiant',1,0);
//$pdf->Cell(70,10,'mot de passe',1,1);
//$pdf->Cell(70,10,$getData[0],1,0);
while( $getData[0] > 1 ) {
$pdf->Cell(70,10,$getData[0],0);
$pdf->Cell(70,10,$json['passsword'],0);
}
$pdf->Output();
}
}
}
fclose($file);
curl_close ($ch);
?>